The Minefield

390 points · 77 comments · view on lemmy.world

77 Comments

KoboldCoterie@pawb.social · 113 pts · 145d (15 replies)

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".

moonshadow@slrpnk.net · 62 pts · 145d (8 replies)

Genuinely my first response. What are VMs for?

muntedcrocodile@hilariouschaos.com · 6 pts · 145d (7 replies)

I run QubesOS BTW. My entire computer is just a bunch of VMs in a trench coat.

Allero@lemmy.today · 5 pts · 145d (6 replies)

Running Qubes as a daily driver is some serious level of privacy enthusiasm

muntedcrocodile@hilariouschaos.com · 4 pts · 143d (5 replies)

I do it mainly cos it makes managing lots of different environments easy. I can have windows and different Linux distros and different packages and cool shit all from one display manager.

Allero@lemmy.today · 2 pts · 143d (4 replies)

Doesn't virtualization eat away a lot of performance? Or do you not care much about it?

muntedcrocodile@hilariouschaos.com · 2 pts · 143d (1 reply)

1-2% is the overhead of virtualization. Hardware virtualization is Goated. And QubesOS uses Zen under the hood same as what's used by aws etc so its well optimised.

Allero@lemmy.today · 3 pts · 143d

Nice

drq@mastodon.ml · 1 pts · 143d (1 reply)

@Allero Not if it's hardware-accelerated. You'll be hard-pressed to find a CPU without hardware virtualization, though.

@muntedcrocodile

Allero@lemmy.today · 1 pts · 143d

And for GPU? For all I understand, everything but dom0 should still require GPU Passthrough to have any decent GPU performance. Does passthrough perform well? Also, am I right in understanding that if you have 2 GPUs or APU/GPU mix, you can only have GPU passed through to one VM, leaving other VMs on the mercy of the same device that renders dom0?

tyler@programming.dev · 17 pts · 145d (5 replies)

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

BeatTakeshi@lemmy.world · 10 pts · 145d (4 replies)

Obvioulsy whoever set this minefield thought about this

Denvil@lemmy.ml · 8 pts · 144d (2 replies)

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 · 2 pts · 142d (1 reply)

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.

assa123@lemmy.world · 2 pts · 142d

oh, and the endpoint key is on ram, to be lost forever after shutdown.

tyler@programming.dev · 2 pts · 143d

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.

Anafabula@discuss.tchncs.de · 78 pts · 145d (5 replies)
\cd ~
corsicanguppy@lemmy.ca · 18 pts · 145d (2 replies)

When people don't know normal things we learned in '92, I get worried.

three@lemmy.zip · 15 pts · 144d

Instead of acting like an asshole, teach us.

somenonewho@feddit.org · 6 pts · 144d

Oof. I consider myself a fairly decent Linux Sysadmin (~15 years experience ~10 years professionally) but I actually didn't know about that. :/

not_IO@lemmy.blahaj.zone · 13 pts · 145d (1 reply)

what does this change?

Anafabula@discuss.tchncs.de · 28 pts · 144d

Bypasses aliases and uses the original command

assembly@lemmy.world · 63 pts · 145d

Combat the minefield with a fork bomb. Ain’t no process surviving this engagement.

rangber@lemmy.zip · 46 pts · 145d (1 reply)

The power cable would like to have a word.

Alberat@lemmy.world · 4 pts · 143d

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

timestatic@feddit.org · 45 pts · 145d (3 replies)

They never guess the next move: Unplugs pc

rockerface@lemmy.cafe · 27 pts · 145d (2 replies)

loud knocking on the door

spicytuna62@lemmy.world · 14 pts · 145d (1 reply)

Either that or the PC keeps running anyway.

FreddiesLantern@leminal.space · 6 pts · 144d

Boston Dynamics: “Either that or the PC keeps running away.”

weissbinder@feddit.org · 43 pts · 145d (11 replies)

How can you prevent users from leaving a directory?

flyingSock@feddit.org · 37 pts · 145d

chroot, and override exit with an alias,could work

grue@lemmy.world · 20 pts · 145d

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 · 16 pts · 145d

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

gegil@sopuli.xyz · 11 pts · 145d (7 replies)

How can you prevent a shutdown using a power key?

XLE@piefed.social · 23 pts · 145d

There's an Emacs command to do that

C-x M-c M-minefield

Unleaded8163@fedia.io · 11 pts · 145d (2 replies)

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.

hperrin@lemmy.ca · 17 pts · 145d

You could also just unplug it.

esc@piefed.social · 3 pts · 145d

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.

theunknownmuncher@lemmy.world · 5 pts · 145d

You can't, lol. Think it's just a joke

ChaoticNeutralCzech@feddit.org · 4 pts · 145d

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 · 4 pts · 145d

If you are using KDE

AstroLightz@lemmy.world · 34 pts · 145d (2 replies)

I can think of a way out:

Just throw the whole PC away. It's someone else's problem now!

rockSlayer@lemmy.blahaj.zone · 20 pts · 145d

But that just becomes a Jumanji issue

pelya@lemmy.world · 4 pts · 145d

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 · 33 pts · 145d (2 replies)

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.

sol6_vi@lemmy.makearmy.io · 4 pts · 144d

There goes my night? Longer?

deczzz@lemmy.dbzer0.com · 4 pts · 144d

Cool! Will give this a try for sure! Always forget commands

savvywolf@pawb.social · 28 pts · 145d (4 replies)

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

(cd is a shell builtin)

glibg10b@lemmy.zip · 9 pts · 145d

Technically they could if run as root by modifying the parent process

Sasquatch@lemmy.ml · 6 pts · 145d

it could just reinvoke $SHELL in the parent dir

BetterDev@programming.dev · 5 pts · 145d

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

tyler@programming.dev · 4 pts · 145d

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

Ghostie@lemmy.zip · 23 pts · 145d
[ removed ]
OwOarchist@pawb.social · 23 pts · 145d (2 replies)

cat 1

tetris11@feddit.uk · 3 pts · 144d (1 reply)

*a single cat is hurled unceremoniously through the window onto your lap*

OwOarchist@pawb.social · 5 pts · 144d

kivihiili@lemmy.blahaj.zone · 22 pts · 145d (1 reply)

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!

Hupf@feddit.org · 5 pts · 145d

There also was Fake DOS back in the day

DasFaultier@sh.itjust.works · 18 pts · 145d (2 replies)

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 · 13 pts · 145d (1 reply)

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 · 3 pts · 145d

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.

wonderingwanderer@sopuli.xyz · 16 pts · 145d

Has "let's play a game" vibes

some_kind_of_guy@lemmy.world · 15 pts · 145d

We have squid games at home.

Squid games at home:

30p87@feddit.org · 15 pts · 144d

objdump -D * | less

snooggums@piefed.world · 14 pts · 145d (5 replies)

Does it have a perpetual energy source if I unplug it?

stoy@lemmy.zip · 36 pts · 145d (4 replies)

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.

RustySharp@programming.dev · 18 pts · 145d (2 replies)

FAT Table

Can I just pay? I can go to the ATM Machine and enter my PIN Number

felbane@lemmy.world · 15 pts · 145d

You forget that FAT stands for "File Allocation Travesty."

kuberoot@discuss.tchncs.de · 2 pts · 144d

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"

khannie@lemmy.world · 2 pts · 145d

Diabolical!

Daedskin@lemmy.zip · 8 pts · 145d

ctrl-D

bitwolf@sh.itjust.works · 7 pts · 144d (1 reply)

What did the minefield directory do here to hijack cd?

Can an alias be applied upon cd?

Alberat@lemmy.world · 1 pts · 143d

on termux it works:

~ $ alias 'cd=echo'
~ $ cd

~ $ cd hi
hi
~ $
AkatsukiLevi@lemmy.world · 5 pts · 145d

ls -lah

shweddy@lemmy.world · 4 pts · 145d

Does it fry my hardware? Or can I just do another fresh install

Wildmimic@anarchist.nexus · 4 pts · 145d

i had a school colleague who could write small programs in bytecode, so i think someone who really knows their shit can get out without issues with cat and ls, as long as there isn't much obfuscation

ikidd@lemmy.world · 3 pts · 145d

strings 1

emotional_soup_88@programming.dev · 2 pts · 145d

I wonder if we could bash -n -v the source code? 🤔 Since -n should error check without execution.

Edit: maybe that only works on scripts?