• KoboldCoterie@pawb.social
    link
    fedilink
    English
    arrow-up
    112
    ·
    10 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”.

    • tyler
      link
      fedilink
      arrow-up
      17
      ·
      10 days ago

      Well yeah? And you do it in a vm. But seems like a decently simple problem anyway. ls -al and compare the sizes.

        • Denvil@lemmy.ml
          link
          fedilink
          arrow-up
          9
          arrow-down
          1
          ·
          9 days ago

          The greatest trick is to make your opponent think you thought of everything. Powering off might just straight up work and they’re just bluffing, might as well try

          • assa123@lemmy.world
            link
            fedilink
            arrow-up
            1
            ·
            8 days ago

            What if it encrypts the disk when entering the dir and the only way to decrypt it is by winning? Decryption keys will be provided via API at the end.

        • tyler
          link
          fedilink
          arrow-up
          2
          ·
          9 days ago

          I mean they didn’t, cause you can just open another terminal window or pull the plug on the computer, but like someone else said, a binary can’t change the directory for you cd is a shell built in, so I’m pretty sure this would be trivial to get past.

    • Alberat@lemmy.world
      link
      fedilink
      arrow-up
      4
      ·
      9 days ago

      it removed your disc encryption keys and the only way to recover it is finding it in memory through the minefield

    • grue@lemmy.world
      link
      fedilink
      arrow-up
      20
      ·
      10 days ago

      Magic, I guess, 'cause nothing in the sceenshot would do it, unless the attacker had already replaced cat with a trojan or something.

    • hperrin@lemmy.ca
      link
      fedilink
      English
      arrow-up
      15
      ·
      10 days ago

      AFAIK, there’s no way to without modifying the system tools and shell.

      • Unleaded8163@fedia.io
        link
        fedilink
        arrow-up
        11
        ·
        11 days ago

        You could probably install a handler for the event that’s triggered when the power button is pressed. Most OSes do that and pop up a graceful shutdown options window. Most hardware will have a hard shutdown option when you hold the power button for a few seconds. You would probably have to overwrite the BIOS or something at that level to prevent that way out.

        • esc@piefed.social
          link
          fedilink
          English
          arrow-up
          3
          ·
          10 days ago

          alt+sysrq+b bypasses this handler, also switching to another vt should just drop you in a normal shell it as well as long the login shell isn’t modified. There are a lot of ways that can be used to break out.

      • ChaoticNeutralCzech@feddit.org
        link
        fedilink
        English
        arrow-up
        4
        ·
        10 days ago

        Encrypt hard drive and keep the key in RAM. Could be recovered with a cold boot attack but that’s very advanced. The DOS virus ONEHALF would run as a daemon encrypring a block on the drive on each boot and intercept reads/writes to the encrypted part as if nothing ever happened. Only after encrypting ½ of the disk, it would reveal itself with an ominous

        Dis is one half.
        Press any key to continue...
        

        The decryption was eventually cracked by ESET and they developed a tool to recover the drive.

    • pelya@lemmy.world
      link
      fedilink
      arrow-up
      4
      ·
      10 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).

  • CannedYeet@lemmy.world
    link
    fedilink
    arrow-up
    32
    ·
    10 days 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.

  • SavvyWolf@pawb.social
    link
    fedilink
    English
    arrow-up
    28
    ·
    10 days ago

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

    (cd is a shell builtin)

    • tyler
      link
      fedilink
      arrow-up
      4
      ·
      10 days ago

      Good point. Also it wouldn’t stop you from just opening another terminal window haha.

    • BetterDev
      link
      fedilink
      arrow-up
      4
      ·
      10 days ago

      I mean, you can just write a whole custom shell for this

  • kivihiili@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    22
    ·
    10 days 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!

  • DasFaultier@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    18
    ·
    10 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
      13
      ·
      10 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
        link
        fedilink
        arrow-up
        3
        ·
        10 days 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.