HN Hall of Fame Weekly email

Detecting the use of "curl | bash" server-side

www.idontplaydarts.com Essays & writing Essays & articles Security & privacy Class of 2020-05 Hall of Fame

Resurfaced independently across 4 calendar years, with breakout response in 3 of them.

submissions
7
submitters
7
observed span
2016–2022
peak thread · 145 comments
500 pts
latest 20+ return · 2020-12-09
198 pts

Submission timeline

2007–2026

One slot for every year since HN launched. Height is that year's peak points; orange marks a 100+ point or 50+ comment breakout. Select a bar to open its strongest thread.

First comments on top threads

HN comment order

The sleep cleverness is excessive though - what you really want to know is if the script you're returning is being executed as it's sent. If it is, then you can be pretty confident that a human isn't reading it line by line. 1. Send your response as transfer-encoding: chunked and tcp_nodelay 2. Send the first command as curl www.example.com/$unique_id Then the server waits before sending the next command - if it gets the ping from the script, we know…

> Installing software by piping from curl to bash is obviously a bad idea and a knowledgable user will most likely check the content first It's funny how so many obvious things are all but obvious when you think a little bit more about it. Interesting read on the subject: https://sandstorm.io/news/2015-09-24-is-curl-bash-insecure-p... (I don't want to enter the `curl | bash` good or bad rabbit hole; just that the topic cannot be just dismissed as "obvious")

ithkuil·352-point thread·

I wonder why there is such a focus on this `curl|bash` pattern. Meanwhile most of us are downloading hundreds of thousands of lines of code using all kinds of package managers and I don't see many inspecting all those downloaded files, especially not manually. I don't think anyone would ever get to doing anything other than checking if you really want to verify everything. I'm not saying that downloading something from your official OS package repositories is the same as…

Need to also detect wget | bash, which should cover most cases that I see on the web

smt88·43-point thread·

The first top-level comment from each of the four biggest threads, in HN’s own order. Excerpts are shortened; open a comment for full context.

Breakout years
3

100+ points or 50+ comments

Total points
1118

reference only — not used in Hall rules or ranking

Total comments
402

reference only — not used in Hall rules or ranking

Every submission