News for hackers. Stuff that matters.
Re:Zero-click, wormable, cross-platform remote code executio... by mwcampbell on Monday December 07, 2020 @10:25AM (#25332995)
I'm confused about the scope of the RCE. Can it escape the Chromium renderer sandbox? Or is that sandbox disabled? Based on the following:

> MS Teams ElectronJS security: remote-require is disabled & filtered, nodeIntegration is false, webview creation is filtered and normally removes insecure params/options. You cannot simply import child_process and execute arbitrary code or create a webview with a custom preload option.

it looks like they did everything right.

I would like this thread to go beyond outrage at how Microsoft handled this, or another excuse to bash Electron. What lessons can developers using Electron take from this? (No, "don't use Electron" doesn't count.)

Re:Zero-click, wormable, cross-platform remote code executio... by dbjorge on Monday December 07, 2020 @10:57AM (#25333366)
The article explains the technical details of the render process escape. Contrary to all the current replies to this comment, it does not look to me that this is using a generalized Electron escape; rather, it is using specific main/render IPC calls which Teams has implemented unsafely as the escape mechanism. Perhaps folks are confusing this with an electron sandbox issue because Teams happens to have called the variable containing their IPC APIs "electronSafeIpc".
Re:Zero-click, wormable, cross-platform remote code executio... by stagger87 on Monday December 07, 2020 @10:43AM (#25333221)
What lessons can we learn from banging our heads on the wall? (No, "don't bang your head on the wall" doesn't count.)
Re:Zero-click, wormable, cross-platform remote code executio... by coldtea on Monday December 07, 2020 @12:42PM (#25334605)
Yeah, because remote code exploits are particularly an issue with Electron, as opposed an order of magnitude less likely to happen with it compared to native code.

Basically you got it completely backwards. The typical native app (which is not Rust or Java but C/C++/Obj-C, etc) only keeps the unsafe part of Electron, and even drops the sandbox (whose holes can always be patched, but total absense cannot).

Re:Zero-click, wormable, cross-platform remote code executio... by toxik on Tuesday December 08, 2020 @06:23AM (#25343956)
Complexity leads to RCEs like the one in TFA, not “unsafe” languages.

It is very disingenuous to say that other native apps keep the unsafe parts; there are no such parts at all.

It should be telling that Microsoft, in one of their most successful products of late, have punched an RCE sized hole in that sandbox unwittingly.

Re:Zero-click, wormable, cross-platform remote code executio... by jyriand on Monday December 07, 2020 @11:29AM (#25333672)
Don't use Teams app, but connect through browser instead... that is if there is no other way to avoid Teams, because you're company has already migrated from Slack.
Re:Zero-click, wormable, cross-platform remote code executio... by toxik on Tuesday December 08, 2020 @06:25AM (#25343969)
Correct me if I’m wrong but the XSS stuff still works then. Having all your Office 365 data stolen may be a problem.
Re:Zero-click, wormable, cross-platform remote code executio... by rakoo on Monday December 07, 2020 @10:47AM (#25333261)
Bang our heads on the wall at the appropriate angle. It's only our fault if we get hurt, we must learn to properly use the tools we have
Re:Zero-click, wormable, cross-platform remote code executio... by darepublic on Monday December 07, 2020 @12:30PM (#25334427)
I bang my head against a wall everyday for a living.
Re:Zero-click, wormable, cross-platform remote code executio... by jacquesm on Monday December 07, 2020 @10:45AM (#25333240)
Avoid Microsoft for stuff that is important, and don't install their software on your machines if you can help it.
Re:Zero-click, wormable, cross-platform remote code executio... by coldtea on Monday December 07, 2020 @12:43PM (#25334617)
Yeah, because other companies or FOSS have a better track record.

E.g. we can drop Exchange for email for a safe alternative like Sendmail.

Re:Zero-click, wormable, cross-platform remote code executio... by roel_v on Monday December 07, 2020 @12:52PM (#25334735)
Or wuftpd. I once accidentally dropped my keyboard, and it turned out that the keypresses that generated were a remote root exploit for wuftpd.
Re:Zero-click, wormable, cross-platform remote code executio... by jacquesm on Monday December 07, 2020 @12:56PM (#25334809)
What are the chances of that happening, that's pretty neat!
Re:Zero-click, wormable, cross-platform remote code executio... by roel_v on Monday December 07, 2020 @02:03PM (#25335780)
Eh, at first I thought so too, but then it turned out my neighbours nan once accidentally hacked the US Navy that way, so after that I didn't feel all that special any more :(
Re:Zero-click, wormable, cross-platform remote code executio... by jacquesm on Monday December 07, 2020 @03:22PM (#25336908)
Hehe, that's hilarious.
Re:Zero-click, wormable, cross-platform remote code executio... by 35fbe7d3d5b9 on Monday December 07, 2020 @01:57PM (#25335699)
With wuftpd? P(x)=1
Re:Zero-click, wormable, cross-platform remote code executio... by boogies on Monday December 07, 2020 @02:19PM (#25335972)
Maybe I’m in a filter bubble, but I’ve never heard of anyone else assigning such low priority to exploits like this.
Re:Zero-click, wormable, cross-platform remote code executio... by jacquesm on Monday December 07, 2020 @12:50PM (#25334715)
Yes, Google has a better track record. You brought open source and - totally unrelated - sendmail into it.
Re:Zero-click, wormable, cross-platform remote code executio... by coldtea on Monday December 07, 2020 @12:53PM (#25334767)
>Yes, Google has a better track record.

Do they? This is just from last month: https://www.zdnet.com/article/google-patches-second-chrome-z...

>You brought open source and - totally unrelated - sendmail into it.

No, you brought the totally unrelated "Avoid Microsoft for stuff that is important, and don't install their software on your machines if you can help it." as if Microsoft is the only place to ever had a RCE...

Re:Zero-click, wormable, cross-platform remote code executio... by jacquesm on Monday December 07, 2020 @12:56PM (#25334803)
That's Chrome, not meet.

As for bringing in unrelated stuff, no that was still within the context of Microsoft's meeting software. It was someone else that brought in the OS.

Re:Zero-click, wormable, cross-platform remote code executio... by dylan604 on Monday December 07, 2020 @03:25PM (#25336948)
Reminds me of the old joke: VirusScanner: We found a virus on your machine called Windows. You you like to remove it?
Re:Zero-click, wormable, cross-platform remote code executio... by pjmlp on Monday December 07, 2020 @11:12AM (#25333491)
Starting by anything running on top of Electron.
Re:Zero-click, wormable, cross-platform remote code executio... by ROARosen on Monday December 07, 2020 @11:41AM (#25333795)
Especially if said machines are actually built by Microsoft.
Re:Zero-click, wormable, cross-platform remote code executio... by boogies on Monday December 07, 2020 @12:00PM (#25333999)
In which case they may be nice enough to block some of their software for you https://www.techrepublic.com/article/microsoft-blocks-major-...
Re:Zero-click, wormable, cross-platform remote code executio... by coldtea on Monday December 07, 2020 @12:39PM (#25334540)
>No, "don't use Electron" doesn't count

Why would it count? The situation would have more easily occured and be even worse with a C/C++ native app.

Re:Zero-click, wormable, cross-platform remote code executio... by jcelerier on Monday December 07, 2020 @02:59PM (#25336516)
would it though - in a C++ app there'd be way less places where people could send you arbitrary code to run over the network ; and if you use any kind of high-level network library you'd be well pressed to have any kind of buffer overflow, as all the buffer handling is done in already-vetted libs, such as Qt, Boost, cpp-rest-sdk, etc
Re:Zero-click, wormable, cross-platform remote code executio... by freeone3000 on Monday December 07, 2020 @03:39PM (#25337161)
It's in the IPC invocation, so for this app in particular, it'd be in the exact same place.
Re:Zero-click, wormable, cross-platform remote code executio... by jcelerier on Monday December 07, 2020 @04:12PM (#25337607)
I have a hard time seeing how. It seems to work by having some JS code to create a webview getting executed. In a pure C++ app there would be no place that would even be able to interpret that js, or any other "script language" in that pipeline.
[dead]
Re:Zero-click, wormable, cross-platform remote code executio... by coldtea on Monday December 07, 2020 @01:49PM (#25335572)
Or, you know, reasomable people, with their own arguments, you knee-jerkly dismiss...

(Not that Rust's safety over C/C++ is an "opinion" or subject to argumentation).

Re:Zero-click, wormable, cross-platform remote code executio... by oskarsv on Monday December 07, 2020 @10:29AM (#25333040)
there are different levels of security for ElectronJS, some, like in this case are not enough.

I think it will take a long time before we can call ElectronJS secure. there are regular sandbox escapes and that is from what we know publicly

Re:Zero-click, wormable, cross-platform remote code executio... by untog on Monday December 07, 2020 @10:32AM (#25333072)
The OP is asking for more detail than “not enough”, though:

“Can it escape the Chromium renderer sandbox? Or is that sandbox disabled?”

Re:Zero-click, wormable, cross-platform remote code executio... by oskarsv on Monday December 07, 2020 @10:34AM (#25333105)
to simplify - no it’s not enabled

the real answer is more complicated as it is not necessarily a global setting and depends on what you call a “sandbox”

Re:Zero-click, wormable, cross-platform remote code executio... by mwcampbell on Monday December 07, 2020 @10:40AM (#25333181)
Thanks. I'd pay (moderately) for the more complicated answer. An ebook on Electron security might be a good idea.
Re:Zero-click, wormable, cross-platform remote code executio... by oskarsv on Monday December 07, 2020 @10:48AM (#25333276)
I'm not an expert on Electron security!

But if not addressed to me, there is no need to pay, you can start here: - https://www.electronjs.org/docs/tutorial/security - https://github.com/electron/electron/security/advisories

As you can see there are plenty of considerations and pitfalls to take into account. Best option is to enable contextIsolation for everything.

Further, Electron security is closely tied to Chrome security so that is one deep rabbit hole

Re:Zero-click, wormable, cross-platform remote code executio... by pjmlp on Monday December 07, 2020 @11:12AM (#25333497)
Best Electron security is not using it in first place.
Re:Zero-click, wormable, cross-platform remote code executio... by coldtea on Monday December 07, 2020 @12:46PM (#25334649)
Yeah, let's stick with raw C/C++, that would be much safer...

Or maybe let's use some research language made by Wirth, and get access to all 10 of packages and 5 devs worldwide using it :-)

Re:Zero-click, wormable, cross-platform remote code executio... by pjmlp on Monday December 07, 2020 @01:52PM (#25335624)
For starters, leave it on the browser.

I didn't mention any programming language.

Re:Zero-click, wormable, cross-platform remote code executio... by gitweb on Monday December 07, 2020 @01:02PM (#25334882)
Telegram Desktop is a cross-platform C++ app. What similar remote code execution exploit has existed in the wild for it?
Re:Zero-click, wormable, cross-platform remote code executio... by coldtea on Monday December 07, 2020 @01:45PM (#25335508)
Re:Zero-click, wormable, cross-platform remote code executio... by gitweb on Monday December 07, 2020 @03:44PM (#25337226)
One of them requires the user to click run on a file, much like running an EXE. The other, simply saves potentially malicious data to external storage which would then have to be run by a separate malicious third-party app. This are far from RCE exploits that execute immediately without poor user decision making, and Rust is not impervious to security exploits similar to these.
Re:Zero-click, wormable, cross-platform remote code executio... by untog on Monday December 07, 2020 @03:55PM (#25337390)
C'mon. Just because there is one C++ app without remote exploits doesn't mean all C++ apps are immune.
Re:Zero-click, wormable, cross-platform remote code executio... by valand on Monday December 07, 2020 @01:32PM (#25335352)
FYI it's not just PL that factors into security. The engineers, for example.
Re:Zero-click, wormable, cross-platform remote code executio... by MaxBarraclough on Monday December 07, 2020 @11:31AM (#25333690)
Rather just keep it in the browser? ;-P
Re:Zero-click, wormable, cross-platform remote code executio... by kevingadd on Monday December 07, 2020 @12:31PM (#25334435)
This is safer to a significant degree.
Re:Zero-click, wormable, cross-platform remote code executio... by CyanLite2 on Monday December 07, 2020 @01:13PM (#25335045)
They could ummm.... build a cross-platform UI framework that rivals Electron without the security and memory bloat issues? I think that's the plan with MAUI.