News for hackers. Stuff that matters.
Re:Detecting the use of “curl – bash” server side (2016) by leokennis on Wednesday December 09, 2020 @05:13AM (#25357097)
Not that it would fix anything, but wouldn't it be possible to:

- Store the install script on www.xyz.com/install.sh

- Store the hash of the install script on www.abc.com/hash.dat

Then in the installation command:

- curl the install script from www.xyz.com/install.sh

- hash it

- curl the hash from www.abc.com/hash.dat

- compare the computed hash with the "curl'd hash"

- only if they match, pipe www.xyz.com/install.sh to bash

In that case, a malicious actor would need to hack at least two locations to be successful.

Re:Detecting the use of “curl – bash” server side (2016) by jorangreef on Wednesday December 09, 2020 @05:21AM (#25357152)
The malicious actor would simply edit the install script to comment out the checksum verification step, since they already own the script.
Re:Detecting the use of “curl – bash” server side (2016) by leokennis on Wednesday December 09, 2020 @07:20AM (#25357797)
Ah yes...good thing I don’t work in IT security...
Re:Detecting the use of “curl – bash” server side (2016) by jorangreef on Wednesday December 09, 2020 @11:29AM (#25360365)
No worries, I've made the same mistake and everyone in software security probably makes that mistake at some point.