this post was submitted on 10 Jun 2024
238 points (94.7% liked)

Programming

17344 readers
150 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS
top 50 comments
sorted by: hot top controversial new old
[–] towerful@programming.dev 93 points 5 months ago* (last edited 5 months ago) (3 children)

What makes this even more sneaky is that JetBrains has a theme called "Darcula".

So, with a wider generic theme called Dracula and themes that duplicate JetBrains Darcula theme, it is no surprise that "Darcula Official" is being installed.
It's more than just a typosquat

Edit:
But why can a theme make web requests?!

[–] hydroptic@sopuli.xyz 65 points 5 months ago (1 children)

But why can a theme make web requests?!

Because we live in a broken world and nothing matters.

On a more serious note, it's a pretty horrifying misfeature. What's even more worrying is that by all appearances Microsoft doesn't give a shit, if they apparently didn't even bother removing the malicious extensions that were reported. Not that I'm surprised, but still.

[–] 30p87@feddit.de 14 points 5 months ago

But why can a theme make web requests?!

Why can a Word or Excel file execute shell code? Why does M$ SQL Server have xp_cmdshell?

Because we live in a broken world and nothing matters.

Because devs chose to live in this part of the world, dictated by M$ and other large companies, who just don't care.

[–] hemko@lemmy.dbzer0.com 31 points 5 months ago

But why can a theme make web requests?!

To display ads on your ide

[–] Kuinox@lemmy.world 9 points 5 months ago (1 children)

It's not a theme here, it's an extension.

[–] towerful@programming.dev 13 points 5 months ago (2 children)

I think that's how themes are distributed for VSCode, right?
With VSCode, everything is an extension.
But the vscode marketplace seems to have filters for themes, so there must be some way to differentiate them.

I think extensions need a permissions system

[–] savedbythezsh@sh.itjust.works 17 points 5 months ago (1 children)

You declare it in the package.json as a category when publishing. It's completely self-selected with no oversight, review, or enforced permissions.

[–] hydroptic@sopuli.xyz 3 points 5 months ago

Microsoft security practices haven't changed much over the decades

[–] Kuinox@lemmy.world 3 points 5 months ago (1 children)

You can install themes directly from the theme selector.

[–] nekusoul@lemmy.nekusoul.de 5 points 5 months ago (1 children)

Even worse, it also previews the theme when selected. I hope that the logic they use for that feature works in a simpler way.

[–] Kuinox@lemmy.world 3 points 4 months ago

I checked the logic and there is no rce.

[–] Kuinox@lemmy.world 48 points 5 months ago (5 children)

Fake news headline. There is no virus installed on millions of computer.
An extension typosquatting an extension with million of install managed to be installed a few hundred of times.

[–] savedbythezsh@sh.itjust.works 40 points 5 months ago (1 children)

I believe they're referring to lower down in the article, where the researchers analyzed existing extensions on the marketplace:

After the successful experiment, the researchers decided to dive into the threat landscape of the VSCode Marketplace, using a custom tool they developed named 'ExtensionTotal' to find high-risk extensions, unpack them, and scrutinize suspicious code snippets.

Through this process, they have found the following:

  • 1,283 with known malicious code (229 million installs).
  • 8,161 communicating with hardcoded IP addresses.
  • 1,452 running unknown executables.
  • 2,304 that are using another publisher's Github repo, indicating they are a copycat.
[–] Kuinox@lemmy.world 4 points 5 months ago (1 children)

If you look at the code of one of the "malicious code", it hit a ... local IP, not a remote one.

[–] lowleveldata@programming.dev 19 points 5 months ago (2 children)

Does that mean the hacker is in my room??

[–] noobface@lemmy.world 7 points 5 months ago

We're seeing connections from IP addresses that aren't even routable on the internet. We're compromised. Time to format.

[–] QuadriLiteral@programming.dev 2 points 4 months ago

Turns out you were the hacker all along

[–] wewbull@feddit.uk 21 points 5 months ago (2 children)

I wouldn't be so quick to write it off.

It's a proof of concept showing the weaknesses in Microsoft's vetting process for extensions published on the store. They then used the process to get pseudo-malicious code inside hundreds of organisations (not hundred of installs) some of which are high profile.

[–] FizzyOrange@programming.dev 3 points 4 months ago (1 children)

Microsoft doesn't have a vetting process for publishing extensions in the store. Maybe the failure is that people assume they do?

[–] Miaou@jlai.lu 1 points 4 months ago (1 children)

Surely you mean "that Microsoft does not make it clear that they don't"?

[–] FizzyOrange@programming.dev 1 points 4 months ago* (last edited 4 months ago)

Maybe, but I think the only app store that does vet apps is the Apple one, so that should be the default expectation.

And I think even they wouldn't manually look for something like this. They're mainly concerned about people breaking the commercial rules.

load more comments (1 replies)
[–] kinttach@lemm.ee 6 points 5 months ago (6 children)

Their findings included an extension that opens an obvious reverse shell.

load more comments (6 replies)
[–] trolololol@lemmy.world 5 points 5 months ago (1 children)
[–] Skydancer@pawb.social 12 points 5 months ago (3 children)

Except their summary is wrong. The researchers went on to search other extensions for known malicious code, and found it in thousands of extensions with tens of millions of total installs.

load more comments (3 replies)
[–] laughterlaughter@lemmy.world -1 points 4 months ago (1 children)

Did you really have to use that stupid "fake news headline" phrase? Gross.

[–] Kuinox@lemmy.world 1 points 4 months ago

Thanks you too

[–] floofloof@lemmy.ca 48 points 5 months ago (2 children)

All malicious extensions detected by the researchers were responsibly reported to Microsoft for removal. However, as of writing this, the vast majority remains available for download via the VSCode Marketplace.

Ah, the Microsoft tradition of always having the wrong priorities.

[–] plz1@lemmy.world 9 points 4 months ago

They didn't put "AI" in the subject line of the emails, so Microsoft doesn't care...

[–] lysdexic@programming.dev 3 points 4 months ago* (last edited 4 months ago) (1 children)

Ah, the Microsoft tradition of always having the wrong priorities.

I wouldn't be too hard on Microsoft. The requirement to curate public package repositories only emerged somewhat recently, as demonstrated by the likes of npm, and putting in place a process to audit and pull out offending packages might not be straight-forward.

I think the main take on this is to learn the lesson that it is not safe to install random software you come across online. Is this lesson new, though?

[–] floofloof@lemmy.ca 3 points 4 months ago (1 children)

I think the main take on this is to learn the lesson that it is not safe to install random software you come across online. Is this lesson new, though?

I think people often have a vaguely formed assumption that plugins are somehow sandboxed and less dangerous. But that all depends on the software hosting the plugin. There was a recent issue with a KDE theme wiping a user's files which brought this to light. We can't assume plugins or themes are any less dangerous than random executables.

[–] biscuitswalrus@aussie.zone 1 points 4 months ago

Hold them all to account, no single points of failure. Make them all responsible.

When talking about vscode especially, those users aren't your mum and dad. They're technology professionals or enthusiasts.

With respect to vendors (Microsoft) for too long have they lived off an expectation that its always a end user or publisher responsibility, not theirs when they're offering a brokering (store or whatever) service. They've tried using words like 'custodian' when they took the service to further detract from responsibility and fault.

Vendors of routers and firewalls and other network connected IoT for the consumer space now are being legislatively enforced to start adhering to bare minimum responsible practices such as 'push to change' configuration updates and automated security firmware updates, of and the long awaited mandatory random password with reset on first configuration (no more admin/Admin).

Is clear this burden will cost those providers. Good. Just like we should take a stance against polluters freely polluting, so too should we make providers take responsibility for reasonable security defaults instead of making the world less secure.

That then makes it even more the users responsibility to be responsible for what they then do insecurely since security should be the default by design. Going outside of those bounds are at your own risk.

Right now it's a wild West, and telling what is and isn't secure would be a roll of the dice since it's just users telling users that they think it's fine. Are you supposed to just trust a publisher? But what if they act in bad faith? That problem needs solving. Once an app/plugin/device has millions of people using it, it's reputation is publicly seen as ok even if completely undeserved.

Hmm rant over. I got a bit worked up.

[–] fubarx@lemmy.ml 31 points 5 months ago (2 children)
[–] Excrubulent@slrpnk.net 6 points 4 months ago

I remember seeing a lot about activeX controls as a kid but not understanding them much. As an adult reading this I was like "were they a way to run arbitrary code on a user's computer?"

Yes, they were a way to run arbitrary code on a user's computer.

[–] lysdexic@programming.dev 2 points 4 months ago

Remembering ActiveX Controls, the Web’s Biggest Mistake:

Running JavaScript everywhere is looming as one of the biggest screwups in InfoSec. What do userscript extensions like Grease monkey teach us?

[–] AIhasUse@lemmy.world 19 points 5 months ago (3 children)

Is there a list of the malicious extensions? What should be done if we ha e malicious ones installed?

[–] tsonfeir@lemmy.world 6 points 5 months ago

It sounds like it’s mostly typosquatting. So just check to be sure you didn’t install something like Pretier instead of Prettier

[–] Skydancer@pawb.social 3 points 5 months ago

The researchers are releasing the scanning tool they created for people to be able to run against their own installs.

[–] InternetPerson@lemmings.world 2 points 5 months ago

As far as I know, there is no such list (yet).

What should be done:
Escalate it to the people responsible for IT administration & security in your company or institution. They'll deal with it.

But the default step if you suspect of being infected is not to use the device at all until you got a green light for it from the security/admin folks. Power down, disconnect from any networks, either via physical cables or wireless, unplug external storage devices and wait for further info.

[–] eveninghere@beehaw.org 2 points 5 months ago* (last edited 5 months ago) (1 children)

You can't trust extensions these days.

[–] balder1993@programming.dev 1 points 4 months ago (2 children)

Or anything that downloads code from an untrusted source…

[–] soggy_kitty@sopuli.xyz 1 points 4 months ago

"Untrusted source" is ambiguous fyi

[–] eveninghere@beehaw.org 1 points 4 months ago

Gone are my student days where I downloaded whichever cool vim plugins

[–] InternetPerson@lemmings.world 1 points 5 months ago

Thanks for sharing!

load more comments
view more: next ›