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.

  • BluescreenOfDeath@lemmy.world
    link
    fedilink
    English
    arrow-up
    16
    ·
    8 hours ago

    The post is specifically about how you can serve a totally different script than the one you inspect. If you use curl to fetch the script via terminal, the webserver can send a different script to a browser based on the UserAgent.

    And whether or not you think someone would be mad to do it, it’s still a widespread practice. The article mentions that piping curl straight to bash is already standard procedure for Proxmox helper scripts. But don’t take anyone’s word for it, check it out:

    https://community-scripts.github.io/ProxmoxVE/

    It’s also the recommended method for PiHole:

    https://docs.pi-hole.net/main/basic-install/

    • mrnobody@reddthat.com
      link
      fedilink
      English
      arrow-up
      8
      ·
      6 hours ago

      The reality is a lot of newcomers to Linux won’t even understand the risks involved, it’s run because that’s what they’re told or shown to do. That’s what I did for pihole many years ago too, I’ll admit

      • atzanteol@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        5
        ·
        5 hours ago

        I’ve been accused of “gate keeping” when I tell people that this is a shitty way to deploy applications and that nobody should do it.