• kivihiili@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    13
    ·
    1 day ago

    while this is not real, something similar in principal very much was! (but not too widespread)

    see here or look up “casino dos malware”

    uh in short it erases “the disk’s” (unsure which) file allocation table (pretty much the dos/windows version of a superblock). apparently some versions did copy it to memory and give the user a chance though!

  • SavvyWolf@pawb.social
    link
    fedilink
    English
    arrow-up
    18
    ·
    1 day ago

    Reminder that binaries cannot change a shell’s working directory, so the non-mines will do nothing.

    (cd is a shell builtin)

  • KoboldCoterie@pawb.social
    link
    fedilink
    English
    arrow-up
    82
    ·
    2 days ago

    Based on the responses in this thread, I feel like you could present this screenshot with a “I bet you couldn’t find your way out of this!” and a zip of the directory, and a significant number of users would voluntarily download it and extract it just to “prove that they could”.

  • CannedYeet@lemmy.world
    link
    fedilink
    arrow-up
    22
    ·
    1 day ago

    Reminds me of gameshell, which is a rogue-like game designed to teach you the unix shell. So instead of navigating with NESW, you cd to locations. At one point you search the “garden”, which is an unmanageable tangle of directories, with find.

    • pelya@lemmy.world
      link
      fedilink
      arrow-up
      4
      ·
      2 days ago

      But it’s on a dedicated server you have already paid for, which also hosts your own Minecraft game server with active players (mission-critical process which can never be allowed to stop).

  • DasFaultier@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    16
    ·
    2 days ago

    Maybe something like find ./ -type f | xargs md5sum, then avoid the one directory where the executable has a different checksum. Heck, even find | ls might suffice.

    • SwingingTheLamp@piefed.zip
      link
      fedilink
      English
      arrow-up
      11
      ·
      2 days ago

      This could be trivially defeated by a program which erases the hard drive unless run using a particular executable name. Then, all twenty entries could simply be hard links to the same executable file on disk, but one of the names would trigger different behavior.

      • tyler@programming.dev
        link
        fedilink
        arrow-up
        2
        ·
        1 day ago

        So then you either cat the executable and hope it’s a shell script, you output the binary with a hex viewer and compare, you modify the executable so it’s in a lower permission group and thus wouldn’t have access to erase the drive, there’s like a hundred ways to solve this.

    • stoy@lemmy.zip
      link
      fedilink
      English
      arrow-up
      31
      ·
      2 days ago

      There was an old virus that would copy your FAT table to ram, erase it from disk, and preset you with a slot machine UI where you would gamble to get the FAT back, if you won, great, the virus would write the FAT back to the drive, if not, you lost everything.

      Rebooting without playing meant loosing everything.

        • KubeRoot@discuss.tchncs.de
          link
          fedilink
          English
          arrow-up
          1
          ·
          14 hours ago

          Despite having Table in the name, FAT isn’t a table, but rather uses a table, and FAT itself is a filesystem. Thus, it’s different from a machine with “machine” being in the name or a number with “number” in the name, and it seems entirely reasonable to refer to the crucial index table in the FAT filesystem as the “FAT table”