What did the minefield directory do here to hijack cd?
Can an alias be applied upon cd?
Hint: :q!
Sister communities:
Community rules (click to expand)
1. Follow the site-wide rules
sudo in Windows.Please report posts and comments that break these rules!
Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't remove France.
What did the minefield directory do here to hijack cd?
Can an alias be applied upon cd?
on termux it works:
~ $ alias 'cd=echo'
~ $ cd
~ $ cd hi
hi
~ $
The power cable would like to have a word.
it removed your disc encryption keys and the only way to recover it is finding it in memory through the minefield
objdump -D * | less
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!
We have squid games at home.
Squid games at home:
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".
Well yeah? And you do it in a vm. But seems like a decently simple problem anyway. ls -al and compare the sizes.
Obvioulsy whoever set this minefield thought about this
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.
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
Reminder that binaries cannot change a shell's working directory, so the non-mines will do nothing.
(cd is a shell builtin)
Technically they could if run as root by modifying the parent process
I mean, you can just write a whole custom shell for this
it could just reinvoke $SHELL in the parent dir
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.
There goes my night? Longer?
Cool! Will give this a try for sure! Always forget commands
\cd ~
what does this change?
Bypasses aliases and uses the original command
Combat the minefield with a fork bomb. Ainβt no process surviving this engagement.
Has "let's play a game" vibes
They never guess the next move: Unplugs pc
loud knocking on the door
Either that or the PC keeps running anyway.
Boston Dynamics: βEither that or the PC keeps running away.β
How can you prevent users from leaving a directory?
chroot, and override exit with an alias,could work
Magic, I guess, 'cause nothing in the sceenshot would do it, unless the attacker had already replaced cat with a trojan or something.
I can think of a way out:
Just throw the whole PC away. It's someone else's problem now!
cat 1
*a single cat is hurled unceremoniously through the window onto your lap*

Iβll hit them with an rm /etc. We go out, we go out together and on my terms.