[me@penguin ~]$ ls not	much	minefield [me@penguin ~]$ cd minefield [me@penguin minefield]$ ls 1	6	11	16	README 2	7	12	17 3	8	13	18 4	9	14	19 5	10	15	20 [me@penguin minefield]$ cat README Welcome traveller.  You have reached The Minefield.  In this directory are a series of executables. You must choose one to run.  One of these executables will return you to your home directory. The others will erase your entire hard drive.  That one executable is your only way out. You cannot "cd" or "exit" your way out of this directory. Not even "shutdown" will work. And don't bother reaching for the power switch, it won't work either.  Choose carefully.  And good luck. [me@penguin minefield]$ cd [me@penguin minefield]$ cd ~ [me@penguin minefield]$ exit [me@penguin minefield]$ shutdown [me@penguin minefield]$
you are viewing a single comment's thread
view the rest of the comments
[–] 18 points 7 months ago (2 children)

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.

  • source
  • hideshow 2 child comments
  • [–] 13 points 7 months ago (1 child)

    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.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 3 points 7 months 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.

  • source
  • parent