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.
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.
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.
How can you prevent users from leaving a directory?
Magic, I guess, 'cause nothing in the sceenshot would do it, unless the attacker had already replaced
catwith a trojan or something.chroot, and override exit with an alias,could work
AFAIK, there’s no way to without modifying the system tools and shell.
How can you prevent a shutdown using a power key?
There’s an Emacs command to do that
C-x M-c M-minefieldYou 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.
You could also just unplug it.
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.
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
The decryption was eventually cracked by ESET and they developed a tool to recover the drive.
You can’t, lol. Think it’s just a joke
If you are using KDE