Transcript

Image of a man pointing a gun at his own foot.

Caption: Installing an AUR package without reading it’s PKGBUILD.

    • Jesus_666@lemmy.world
      link
      fedilink
      English
      arrow-up
      30
      ·
      5 days ago

      If you want a bunch of stuff that’s not in core or extra and you don’t want to intensely babysit the AUR, you could try Chaotic-AUR. It hosts prebuilt packages for a bunch of AUR packages which are actively maintained by the Chaotic team.

      I consider it to be more secure than the AUR proper since they actually care for their packages and review nontrivial changes. For instance, the recent takeover attacks didn’t hit Chaotic-AUR builds since the changed packages didn’t make it past the review.

      It’s still an unofficial third-party repository and closer to the AUR than to extra but I consider it a major step up.

    • Azzu@leminal.space
      link
      fedilink
      arrow-up
      18
      arrow-down
      1
      ·
      5 days ago

      I mean how often do you install AUR packages? Usually takes like a minute or so to skim through PKGbuild and the pkg comments and look for obvious issues. And most updates are just a sha hash and version change, taking like 5s to check.

      • HereIAm@lemmy.world
        link
        fedilink
        arrow-up
        12
        ·
        5 days ago

        But wasn’t the latest AUR attack from a dependancy in the pkgbuild? Going out of your way to review all the dependencies as well is not really possible by just skimming through the script.

      • Baŝto@discuss.tchncs.de
        link
        fedilink
        English
        arrow-up
        6
        ·
        5 days ago

        I need a better wrapper that shows me diffs since last build. I’m too lazy for this

        Also pulling in release messages from git etc would be nice

      • NaibofTabr@infosec.pub
        link
        fedilink
        English
        arrow-up
        2
        arrow-down
        1
        ·
        4 days ago

        Rarely, to be sure. I tried Arch for a bit, but I need a computer that I can actually use to get shit done, that isn’t a constant project itself. Even Qubes doesn’t require as much effort to keep operational.

  • Digit@lemmy.today
    link
    fedilink
    English
    arrow-up
    1
    ·
    2 days ago

    I realised…

    I wasn’t going to do that.

    And I was only using Artix for the AUR.

    So I stopped using Artix.

    Not responsible enough.

    Responsible enough to stop.

  • Richard@lemmy.world
    link
    fedilink
    arrow-up
    11
    ·
    5 days ago

    Nah, if you really want to live on the bleeding edge you gotta make blindly installing vibecoded junk from shady parts of the AUR part of your workflow

      • MonkderVierte@lemmy.zip
        link
        fedilink
        arrow-up
        6
        ·
        5 days ago

        The compromised packages load a script from thr net that runs a compromised npm package (“atomic-lockfile” 1.4.2).

        Ok, also a AUR issue. But more so a NPM one, since they have all full moon two supply-chain attacks.

  • zitrone 🍋@europe.pub
    link
    fedilink
    arrow-up
    10
    ·
    5 days ago

    just use nix instead

    we have super secure mechanisms in place to prevent supply chain attacks

    /s (nix just hasn’t been targeted yet (as far as we know 💀💀))

    • Euphoma@lemmy.ml
      link
      fedilink
      English
      arrow-up
      5
      ·
      5 days ago

      Yeah, I just update all 20 flakes that I sourced from github and pray that none of them were hacked

    • chortle_tortle@mander.xyz
      link
      fedilink
      arrow-up
      3
      ·
      5 days ago

      /s (nix just hasn’t been targeted yet (as far as we know 💀💀))

      Isn’t the real security through obscurity just being such a fringe market no one bothers? 🤔

  • KernelTale@programming.dev
    link
    fedilink
    English
    arrow-up
    6
    ·
    4 days ago

    If it’s endorsed by the project team I might as well. At that point it’s the same as downloading from GitHub and if I am in AUR I’ve probably not found it in standard repos nor flathub.

  • MalReynolds@slrpnk.net
    link
    fedilink
    English
    arrow-up
    8
    ·
    5 days ago

    If possible do it in a distrobox and down networking before running, yes that won’t stop the curl | sh in the install, but at least you can blow it away without hurting your main install and it will likely infect only the distrobox. Bonus points for an immutable main OS.

    As the whole supply chain attack vector gets more sophisticated, and probably subtler in effect, these are going to be harder and harder to spot and likely start making it into main repos. Keep sharp people.

    Not real fun for a linuxmemes post, but I think it needs saying.

    • N.E.P.T.R@lemmy.blahaj.zone
      link
      fedilink
      English
      arrow-up
      7
      ·
      5 days ago

      Distrobox is not an isolated environment, it is quite the opposite. They say so themselves on their page:

      Security implications

      Isolation and sandboxing are not the main aims of the project, on the contrary it aims to tightly integrate the container with the host. The container will have complete access to your home, pen drive, and so on, so do not expect it to be highly sandboxed like a plain docker/podman container or a Flatpak.

      I would argue that Docker isn’t a good way to stop malware either, since it is highly vulnerable to sandbox escape leveraging the shared host-guest kernel, like the many of LPEs that have been found in the last few months (example using copy-fail).

      Docker is not a secure sandbox, Podman is not a secure sandbox, Flatpak is not a secure sandbox. Use a VM, or better yet, don’t use the AUR.

        • N.E.P.T.R@lemmy.blahaj.zone
          link
          fedilink
          English
          arrow-up
          2
          ·
          4 days ago

          Things sandboxed by Firejail share the same host kernel. Therefore, kernel vulnerabilities could allow for privilege escalation.

          Firejail itself is a security-hole. It is a massive root SetUID binary which can and has been used for privilege escalation. I avoid it entirely. Unprivileged sandboxes are better, but lack the built-in profiles provided by Firejail.

          If I was trying to sandbox malware, I would use sydbox. It is memory safe (unlike Firejail or Bubblewrap), unprivileged (unlike Firejail), secure sandbox by default (unlike Bubblewrap), extensively uses all relevant Linux security features/modules (more than any other), and actually helps to stop LPE by re-implementing or denying dangerous syscalls like in the case of many of the recent vulnerabilities. Biggest caveat is that it’s not for beginners, even though it abstracts a lot of the complexity. I’d also neverbrun malware in just a sandbox, but use that alongside a proper VM.

          TL;DR No sandbox will save you from good malware. Firejail might be enough for script kiddies, but could make your system more vulnerable to privilege escalation attacks. Avoid installing things you don’t need.

      • MalReynolds@slrpnk.net
        link
        fedilink
        English
        arrow-up
        1
        ·
        5 days ago

        Distrobox is not an isolated environment

        True, you’ll note I didn’t say it is sandboxed or isolated, but it is a different environment. Paths that point to normal things like /usr etc. will be in the distrobox environment. That said, unless you use a custom home for the distrobox (you should anyway), your home directory is hosed. At this point I expect the malware to not be distrobox aware and use things like distrobox-host-exec, that may change.

        A VM is absolutely a better approach, if significantly more frictional.

        • N.E.P.T.R@lemmy.blahaj.zone
          link
          fedilink
          English
          arrow-up
          3
          ·
          4 days ago

          You don’t need to say the words “sandboxed” or “isolated” to say effectively the same thing. Your goal with distrobox was to keep the AUR malware separate from your normal system, no?

          Security through obscurity is not security. The malware can do the same data exfiltration regardless of root access because the AUR malware has been about stealing secrets in user-readable directories. Setting a custom home for distrobox does not disallow access to the normal one.

          Say for example that your default user home is /home/user and you set the distrobox home to /tmp/home

          If you run ls $HOME inside distrobox it will list files in /tmp/home, but just as easily you could run ls /home/$USER and it would list in your default home. Or alternatively just use the find command and steal secrets without targeting the user home.

          This is because changing the user home through distrobox doesn’t do anything about preventing directory traversal to your default home.

          If your goal is to create a different environment and you don’t care that it won’t stop malware, use Incus or Podman directly. Distrobox is the wrong choice.

          My point was simple: when dealing with malware, distrobox is not an effective method of creating a “different environment” because that is antithetical to its stated goals.

          You can do whatever you want, I am not here to police your choice on your personal system. I only take issue with recommending this strategy to others.

    • MonkderVierte@lemmy.zip
      link
      fedilink
      arrow-up
      2
      ·
      5 days ago

      Btw, login uses /bin/sh (or respective), script headers also, all fixed paths; would anything break, if you do alias sh=echo in your session setup script?

  • Kangae_Hishiryo@scribe.disroot.org
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    5 days ago

    I once found a Rust program that streamlined the PKGBUILD reviewing process a lot by, first of all, giving you a really neat list of patterns and behaviours that would make a PKGBUILD suspicios or even plain dangerous, then having a scriptable rule-based engine that would either abort that operation, or show warns and workarounds to you.

    I forgot its name, unfortunately, and I installed it on my previous installation (Garuda, now I’m on CachyOS).

    Very dumb of my part not to try to write that down before the OS change lol.

  • MonkderVierte@lemmy.zip
    link
    fedilink
    arrow-up
    4
    arrow-down
    1
    ·
    5 days ago

    Update your desktop only all one or two weeks, get basic protection (adblocker, hosts file), read the news.

    It’s a peaceful life.

  • sel@piefed.social
    link
    fedilink
    English
    arrow-up
    1
    ·
    4 days ago

    I just don’t understand the process of I don’t have two minutes to read what I’m installing. It’s fucking batshit crazy that all these retards want to come use Linux which is fine but then when they get solid advice they tell us they can’t be bothered.

    • flying_sheep@lemmy.ml
      link
      fedilink
      arrow-up
      3
      ·
      4 days ago

      Yeah, when something isn’t in the official repos, NixOS exists, Flatpak exists, and they’re all vetted.

      Wanting a super clean system where everything is managed by pacman is purely about taste, so if you want it, you clearly can be bothered to put in the 2 minutes of work.