News for hackers. Stuff that matters.
Re:Dependency Confusion: How I Hacked Into Apple, Microsoft ... by walrus01 on Wednesday February 10, 2021 @05:30AM (#26087534)
Hey let's just sudo curl | bash

what could possibly go wrong?

Re:Dependency Confusion: How I Hacked Into Apple, Microsoft ... by thombles on Wednesday February 10, 2021 @06:08AM (#26087743)
Not sure if serious, but I will point out this is significantly different. If I'm installing an application like homebrew or the Rust toolchain then I am explicitly giving them the right to code execution. It doesn't much matter whether they get it through the script on their website or the binaries downloaded from that website.

Random libraries, possibly pulled in by a dependency of a dependency of a dependency... not so much.

Re:Dependency Confusion: How I Hacked Into Apple, Microsoft ... by hda2 on Wednesday February 10, 2021 @10:03PM (#26097789)
I know this is besides the point, but rust can be installed - without piping the output of a public-facing server into a privileged shell - by using their offline installer: https://forge.rust-lang.org/infra/other-installation-methods...

They offer PGP signatures too!

Re:Dependency Confusion: How I Hacked Into Apple, Microsoft ... by beermonster on Wednesday February 10, 2021 @10:04AM (#26090057)
You even see Microsoft offering those types of install one-liners. e.g.

curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin <additional install-script args>

See https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-in...

There are other examples I've seen from time to time.

Re:Dependency Confusion: How I Hacked Into Apple, Microsoft ... by da_big_ghey on Wednesday February 10, 2021 @06:08AM (#26087744)
That's curl | sudo bash smh what an amateur