this post was submitted on 14 Dec 2023
115 points (99.1% liked)

Programming

21545 readers
894 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 2 years ago
MODERATORS
top 7 comments
sorted by: hot top controversial new old
[โ€“] foobaz@lemmy.world 25 points 2 years ago

cat ~/.ssh/id_rsa ๐Ÿค”

Feature request: steal ed25519 keys too

[โ€“] mrwiggles@prime8s.xyz 6 points 2 years ago (1 children)

And this is why you password protect your ssh keys

[โ€“] platypus_plumba@lemmy.world 1 points 2 years ago

It's honestly crazy that tools like npm don't force you to encrypt the tokens for the npm repos. They don't even support it. Any stupid read_file() with http.post() can screw 1000 people.

[โ€“] ShaunaTheDead@kbin.social 4 points 2 years ago (1 children)

This feels like a great application of AI to root around through the code of packages in these repos and find ones that access the ssh key directory at all to be looked at more thoroughly by a human.

[โ€“] CmdrKeen@lemmy.today 4 points 2 years ago

IDK, virus scanners and malware detectors could do these things before AI.

You could search for stuff like directly accessing the ~.ssh directory, or any invocations of wget or curl to download external scripts and run them through an interpreter and flag those for closer inspection.

If you want to get fancier, automate installing packages in an isolated environment (like a container or VM) and keep track of every file system access and network request they make.

Sure, eventually they'll figure out ways to obfuscate those things, too, but it could at least prevent people from doing things in such blatantly obvious ways.

[โ€“] dudinax@programming.dev 3 points 2 years ago (1 children)

What's a stream of packages?

[โ€“] blargerer@kbin.social 19 points 2 years ago

Its just a weird word choice for many/a group. If you read the article they are typo squatting legitimate packages with alternate versions that steal the ssh keys.