I set up a quick demonstration to show risks of curl|bash and how a bad-actor could potentially hide a malicious script.

It’s nothing new or groundbreaking, but I figure it never hurts to have another reminder.

  • Ephera@lemmy.ml
    link
    fedilink
    English
    arrow-up
    5
    ·
    7 hours ago

    Most developers I’ve looked at would happily just paste the curl|bash thing into the terminal.

    I mean, I typically see it used for installing applications, and so long as TLS is used for the download, I’m still not aware of a good reason why you should check the Bash script in particular in that case, since the application itself could just as well be malware.

    Of course, it’s better to check the Bash script than to not check it, but at that point we should also advise to download the source code for the application, review it and then compile it yourself.
    At some point, you just have to bite the bullet and I have not yet seen a good argument why the Bash script deserves special treatment here…

    Having said that, for cases where you’re not installing an application, yeah, reviewing the script allows you to use it, without having to trust the source to the same degree as you do for installing an application.