News for hackers. Stuff that matters.
Re:Bun: Fast JavaScript runtime, transpiler, and NPM client ... by vanviegen on Tuesday July 05, 2022 @05:26PM (#31993926)
And we need to ban binary downloads from vendor sites as well, as those pose the exact same risks? Good luck with that!
Re:Bun: Fast JavaScript runtime, transpiler, and NPM client ... by dementiapatien on Tuesday July 05, 2022 @05:32PM (#31993996)
Techniques like this could make curl|bash more prone to malicious activity: https://www.idontplaydarts.com/2016/04/detecting-curl-pipe-b...
Re:Bun: Fast JavaScript runtime, transpiler, and NPM client ... by vore on Tuesday July 05, 2022 @05:35PM (#31994029)
You're running untrusted binaries anyway in the end, so I don't think this is anything more than a neat party trick.
Re:Bun: Fast JavaScript runtime, transpiler, and NPM client ... by dementiapatien on Tuesday July 05, 2022 @05:48PM (#31994166)
But this technique lets you serve malicious code to a small number of people using curl|bash, rather than hosting obviously-bad binaries that anyone can inspect and call you out on. It also lets you target the attack to specific users or IP blocks.

The previous HN discussion said it better than I can: https://news.ycombinator.com/item?id=17636032

Re:Bun: Fast JavaScript runtime, transpiler, and NPM client ... by efreak on Wednesday July 06, 2022 @01:19AM (#31996991)
Moreutils has two programs that would trivially defeat this:

`sponge` reads the full input before passing it on

`vipe` inserts your editor inline, so you can view/modify the input before passing it on to bash (change an install directory, etc)