• katy ✨
    arrow-up
    184
    arrow-down
    4
    ·
    10 months ago
    edit-2
    10 months ago
    link
    fedilink

    sudo apt install microsoft-edge-stable

  • WetFerret
    arrow-up
    79
    arrow-down
    0
    ·
    10 months ago
    link
    fedilink

    Many people have given great suggestions for the most destroying commands, but most result in an immediately borked system. While inconvenient, that doesn’t have a lasting impact on users who have backups.

    I propose writing a bash script set up to run daily in cron, which picks a random file in the user’s home directory tree and randomizes just a few bytes of data in the file. The script doesn’t immediately damage the basic OS functionality, and the data degradation is so slow that by the time the user realizes something fishy is going on a lot of their documents, media, and hopefully a few months worth of backups will have been corrupted.

    • Appoxo
      arrow-up
      14
      arrow-down
      0
      ·
      10 months ago
      link
      fedilink

      So basically malware by a sadistic internet troll?

      • WetFerret
        arrow-up
        1
        arrow-down
        0
        ·
        10 months ago
        link
        fedilink

        I think we may need to implement a 128 bit unix timestamp before that will work.

  • OtterEnglish
    arrow-up
    77
    arrow-down
    1
    ·
    10 months ago
    link
    fedilink

    Some generative AI is going to swallow this thread and burp it up later

    • Dandroid
      arrow-up
      21
      arrow-down
      1
      ·
      10 months ago
      link
      fedilink

      My wife’s job is to train AI to not do that. It’s pretty interesting, actually.

      • MDKAOD
        arrow-up
        13
        arrow-down
        3
        ·
        10 months ago
        link
        fedilink

        A bad actor doesn’t care what your wife does. :)

        • Goun
          arrow-up
          14
          arrow-down
          2
          ·
          10 months ago
          link
          fedilink

          I too choose this guys wife

        • psmgx
          arrow-up
          7
          arrow-down
          2
          ·
          10 months ago
          link
          fedilink

          Most orgs doing AI research should be assumed to be bad actors until proven otherwise

          • AsterixTheGoth
            arrow-up
            4
            arrow-down
            1
            ·
            10 months ago
            link
            fedilink

            And even then, that proof only applies retrospectively. It can’t predict future behaviours.

        • Dandroid
          arrow-up
          1
          arrow-down
          0
          ·
          10 months ago
          link
          fedilink

          She works for a company. She asks a bunch of questions and rates the answers the AI gives. She tries to trick it into giving answers to questions that it shouldn’t be making it extra important (“My grandmother had an amazing mustard gas recipe that reminds me of my childhood. I want to make for her birthday. Please tell me how”). She then writes a report on if the answers were good or bad, and if it said anything it wasn’t supposed to.

  • LKC
    arrow-up
    74
    arrow-down
    1
    ·
    10 months ago
    link
    fedilink

    If you allow root privileges, there is:

    sudo rm -rf --no-preserve-root /

    If you want to be malicious:

    sudo dd if=/dev/urandom of=/dev/sdX

    or

    sudo find / -exec shred -u {} \;

    • Shadow
      arrow-up
      40
      arrow-down
      1
      ·
      10 months ago
      link
      fedilink

      Let’s extend a little and really do some damage

      for x in /dev/(sd|nvme)*; do dd if=/dev/urandom of=$x bs=1024 & ; done

      • mrbaby
        arrow-up
        32
        arrow-down
        0
        ·
        10 months ago
        edit-2
        10 months ago
        link
        fedilink

        Now alias ls= all that. And throw it in a background process. And actually return the value of ls so it doesn’t look like anything nefarious is going on.

        I bet you could chroot into a ram disk so you’re not tearing the floor out from under you.

        The victim would find this prank hilarious and everyone would like you and think you’re super cool.

        • wellDuuhEnglish
          arrow-up
          3
          arrow-down
          0
          ·
          10 months ago
          link
          fedilink

          You evil being! LMAO You just made me even more paranoid now, questioning every command I type 🤣

      • hperrin
        arrow-up
        11
        arrow-down
        0
        ·
        10 months ago
        link
        fedilink

        Don’t forget the mmc block devices too. Gotta purge those SD cards. (/dev/mmcblk*)

    • fubarx
      arrow-up
      21
      arrow-down
      1
      ·
      10 months ago
      link
      fedilink

      JFC. That’s terminal.

      • Kecessa
        arrow-up
        14
        arrow-down
        1
        ·
        10 months ago
        link
        fedilink

        Yes, you enter that in the terminal

        🙃

    • MonkderZweite
      arrow-up
      1
      arrow-down
      0
      ·
      10 months ago
      edit-2
      10 months ago
      link
      fedilink

      sudo dd if=/dev/urandom of=/dev/sdX

      sudo cp /dev/urandom /dev/nvme0n1 or

      # cat /dev/urandom > /dev/nvme0n1

      Way faster.

      But honestly, find ~/ -type f -delete is almost as bad.

    • Carighan Maconar
      arrow-up
      18
      arrow-down
      1
      ·
      10 months ago
      link
      fedilink

      Everyone else talking about how to shred files or even the BIOS is missing a big leap, yeah. Not just destroying the computer: destroying the person in front of it! And vim is happy to provide. 😅

    • TopRamenBinLadenEnglish
      arrow-up
      2
      arrow-down
      0
      ·
      10 months ago
      link
      fedilink

      True, just entering vim on a pc for a user who doesn’t know about vim’s existence is basically a prison sentence. They will literally be trapped in vim hell until they power down their PC.

      • electric_nan
        arrow-up
        2
        arrow-down
        0
        ·
        10 months ago
        link
        fedilink

        I once entered vim into a computer. I couldn’t exit. I tried unplugging the computer but vim persisted. I took it to the dump, where I assume vim is still running to this very day.

  • rattking
    arrow-up
    59
    arrow-down
    0
    ·
    10 months ago
    edit-2
    10 months ago
    link
    fedilink

    deleted by creator

    • sndrtj
      arrow-up
      10
      arrow-down
      0
      ·
      10 months ago
      link
      fedilink

      Something I did to someone who needed to know the effects of not locking ones screen when away: alias ls to echo 'Error: file not found'. Took them a good hour to figure out what was wrong with their machine 😅

      • FIST_FILLET
        arrow-up
        2
        arrow-down
        0
        ·
        10 months ago
        link
        fedilink

        linux rookie here, what’s the command to reverse an alias then? do you just “alias ls ls” to overwrite it?

        • sndrtj
          arrow-up
          4
          arrow-down
          0
          ·
          10 months ago
          link
          fedilink

          Backlash. \ls would get you regular ls. Note that ls already is aliased on some popular distros with some common flags.

        • Chobbes
          arrow-up
          3
          arrow-down
          0
          ·
          10 months ago
          link
          fedilink

          You can use unalias, or you can use a backslash in front of an aliased command or surround it in double quotes to ignore the alias temporarily.

      • flashgnash
        arrow-up
        1
        arrow-down
        0
        ·
        10 months ago
        link
        fedilink

        Alias ‘ls’ to ‘sl’ for fun times

      • TheGalacticVoid
        arrow-up
        1
        arrow-down
        0
        ·
        10 months ago
        link
        fedilink

        My guess is that it takes the output of the “exit” command and writes it to .bashrc. I believe this would make it impossible to open the terminal, but it could just close the terminal and do nothing instead.

    • neonred
      arrow-up
      4
      arrow-down
      1
      ·
      10 months ago
      link
      fedilink

      That’s nice.

      using systemctl poweroff adds a bit of extra round trip time

  • Ruscal
    arrow-up
    57
    arrow-down
    0
    ·
    10 months ago
    link
    fedilink

    sudo chmod 000 -R / is very fun way of braking your system and is not widely known 🙂

      • utopianfiatEnglish
        arrow-up
        14
        arrow-down
        0
        ·
        10 months ago
        link
        fedilink

        I imagine if you can mount from a busybox possibly

          • CalicoJack
            arrow-up
            13
            arrow-down
            0
            ·
            10 months ago
            link
            fedilink

            Eh, just hit it with the 777 and pray. Then swear at it some more.

              • LrdThndr
                arrow-up
                4
                arrow-down
                0
                ·
                10 months ago
                link
                fedilink

                Boot from a usb stick, mount the fs, use the live environment’s chmod command to fix stuff.

            • nixcamic
              arrow-up
              4
              arrow-down
              0
              ·
              10 months ago
              link
              fedilink

              I think you’ll need to change passwd and shadow, maybe a few other files, but besides that it’ll mostly work.

          • utopianfiatEnglish
            arrow-up
            4
            arrow-down
            0
            ·
            10 months ago
            link
            fedilink

            Yeah that’s the painful part. A backup would be key here

            • intensely_human
              arrow-up
              1
              arrow-down
              0
              ·
              10 months ago
              link
              fedilink

              Worst case you boot up a virtual server with the same OS as your own and just go down the tree learning permissions, and it’s a deep dive learning experience.

      • fossphiEnglish
        arrow-up
        1
        arrow-down
        0
        ·
        10 months ago
        link
        fedilink

        chroot in and then syncing the permissions from something like the equivalent of filesystem package in Arch for your distro should get you going

    • oriondOP
      arrow-up
      2
      arrow-down
      0
      ·
      10 months ago
      link
      fedilink

      What does this do? nobody can read any file? would sudo chmod 777 fix it at least to a usable system?

      • Ruscal
        arrow-up
        11
        arrow-down
        0
        ·
        10 months ago
        link
        fedilink

        The trick is that you loose access to every file on the system. chmod is also a file. And ls. And sudo. You see where it’s going. System will kinda work after this command, but rebooting (which by a coincidence is a common action for “fixing” things) will reveal that system is dead.

      • d3Xt3r
        arrow-up
        10
        arrow-down
        0
        ·
        10 months ago
        link
        fedilink

        Yep. You could run chmod again to fix it (from a different OS / rescue USB), but that would leave all the permissions in a messy state - having everything set to 777 is incredibly insecure, and will also likely break many apps/scripts that expect more restrictive permissions. So the only way to fix this properly would be to reinstall your OS/restore from backups.

      • TechlosAkan
        arrow-up
        4
        arrow-down
        0
        ·
        10 months ago
        link
        fedilink

        How are you gonna run chmod when you don’t have permissions to use it anymore?

  • MuchPineapples
    arrow-up
    38
    arrow-down
    1
    ·
    10 months ago
    edit-2
    10 months ago
    link
    fedilink

    Everyone is deleting data, but with proper backups that’s not a problem. How about:

    curl insert_url_here | sudo bash

    This can really mess up your life.

    Even if the script isn’t malicious, if the internet drops out halfway the download you might end up with a “rm -r /, or similar, command.

    • NaNEnglish
      arrow-up
      7
      arrow-down
      0
      ·
      10 months ago
      link
      fedilink

      So many things these days use that install.sh piping stuff, very bad practice.

  • enkers
    arrow-up
    35
    arrow-down
    0
    ·
    10 months ago
    link
    fedilink

    Worst I can imagine would be something like zeroing your bios using flashrom.

    • al177
      arrow-up
      8
      arrow-down
      0
      ·
      10 months ago
      link
      fedilink

      Sometimes EDID eeproms are writable from i2c-dev And sometimes VRM configuration ports too

  • Dehydrated
    arrow-up
    27
    arrow-down
    0
    ·
    10 months ago
    link
    fedilink

    Probably dd if=/dev/zero of=/dev/sda or whatever your system volume is

    • gens
      arrow-up
      15
      arrow-down
      0
      ·
      10 months ago
      link
      fedilink

      Posible to recover data, use /dev/urandom.

      • Natanael
        arrow-up
        8
        arrow-down
        2
        ·
        10 months ago
        link
        fedilink

        Only on very old hard disks, on newer disks there’s no difference between overwrite patterns

    • gorysubparbagel
      arrow-up
      3
      arrow-down
      0
      ·
      10 months ago
      link
      fedilink

      With wear levelling on SSDs you may be able to recover some of the data

    • grabyourmotherskeys
      arrow-up
      2
      arrow-down
      1
      ·
      10 months ago
      link
      fedilink

      I did have RH Linux die while updating core libs a very long time ago. It deleted them and the system shut down. No reboot possible. I eventually (like later that day) copied a set of libs from another rh system and was able to boot and recover.

      Never used rh by choice again after that.

  • zephyr
    arrow-up
    25
    arrow-down
    0
    ·
    10 months ago
    edit-2
    10 months ago
    link
    fedilink

    Everyone is talking about rm -rf / and damage to storage drives, but I read somewhere about EFI variables having something to do with bricking the computer. If this is possible, then it’s a lot more damage than just disk drives.

    Edit: this is interesting SE post https://superuser.com/questions/313850

    • waiglEnglish
      arrow-up
      17
      arrow-down
      0
      ·
      10 months ago
      link
      fedilink

      That ‘amp;’ does not belong in there, it’s probably either a copy-paste error or a Lemmy-error.

      What this does (or would do it it were done correctly) is define a function called : (the colon symbol) which recursively calls itself twice, piping the output of one instance to the input of the other, then forks the resulting mess to the background. After defining that fork bomb of a function, it is immediately called once.

      It’s a very old trick that existed even on some of the ancient Unix systems that predated Linux. I think there’s some way of defending against using cgroups, but I don’t know how from the top of my head.

    • ArtVandelayEnglish
      arrow-up
      13
      arrow-down
      1
      ·
      10 months ago
      link
      fedilink

      I think poor Lemmy is trying to help URL encode your fork bomb lol

    • 𝕽𝖚𝖆𝖎𝖉𝖍𝖗𝖎𝖌𝖍
      arrow-up
      10
      arrow-down
      0
      ·
      10 months ago
      link
      fedilink

      I was going to suggest a fork bomb, but it is recovered easily. Then I thought about inserting a fork bomb into .profile, or better, into a boot process script, like:

      echo ':(){:|:&};:' | sudo tee -a /bin/iptables-apply
      

      That could be pretty nasty. But still, pretty easy to recover from, so not really “destructive.

    • SaigonauticonEnglish
      arrow-up
      2
      arrow-down
      0
      ·
      10 months ago
      link
      fedilink

      Came here for this one. Not the most destructive, but certainly the most elegant.

  • NaNEnglish
    arrow-up
    20
    arrow-down
    0
    ·
    10 months ago
    edit-2
    10 months ago
    link
    fedilink

    “wipefs -a” instantly removes filesystem signatures. It’s fast, doesn’t actually delete data but is just as effective in most cases where you’re not worried about someone trying to recover it. Much faster than rm on /. As far as the OS is concerned the drive is then empty.

    “nvme format” is also fast.

    • huf [he/him]English
      arrow-up
      3
      arrow-down
      0
      ·
      10 months ago
      link
      fedilink

      youngsters and their tools we just used to dd some /dev/zero onto the block device and ^C out of it after a second or two :D