Live data from Hacker News

Suicide Linux (2009)

qntm.org

21–30 of 183 posts

Re: Suicide Linux (2009)

#21
post #13

This is like that time, last week, when I was having issues with do-release-upgrade and someone helpfully suggested to run sudo apt-get purge python* && sudo apt-get autoclean && sudo apt-get install python* Which I did without paying attention to what I was doing and it turns out that this is one of the worst things you could do ever on a Debian-based distro. Damn you, abu-ahmed al-khatiri.

What's wrong with that command?

Many programs, including system utilities, are written in or indirectly powered by Python. Removing Python effectively cripples half of your system.

Re: Suicide Linux (2009)

#22
> Perhaps rm -rf / should be replaced with something with more verbose flags set.

It is replaced. You'll need to now enter `rm -rf / --no-preserve-root` for that command to actually do damage.

Re: Suicide Linux (2009)

#23
post #22

> Perhaps rm -rf / should be replaced with something with more verbose flags set. It is replaced. You'll need to now enter `rm -rf / --no-preserve-root` for that command to actually do damage.

In fact, even with the protection in place, you just need `rm -rf /*`...

Re: Suicide Linux (2009)

#24
post #13

This is like that time, last week, when I was having issues with do-release-upgrade and someone helpfully suggested to run sudo apt-get purge python* && sudo apt-get autoclean && sudo apt-get install python* Which I did without paying attention to what I was doing and it turns out that this is one of the worst things you could do ever on a Debian-based distro. Damn you, abu-ahmed al-khatiri.

What's wrong with that command?

I can't speak for all Debian, but I've done the same on a Ubuntu. Both the package manager and terminal emulator rely on python.

It's not quite rm -rf /, but it was certainly "fun".

Re: Suicide Linux (2009)

#25
post #5

Interesting. It annoys me when hackers tend to do something 'creative' once they're in. Instead of recursively deleting everything (which has the most impact) - they try some novel and boring task which has low impact. The end goal of all nefarious forms of hacking should be to wipe everything.

Viruses in the 80s used to wipe everything or do something very visible with the screen. They got more creative in the 90s, especially after many people got an internet connection at work or at home.

Re: Suicide Linux (2009)

#26

Earlier quoted context omitted.

What's wrong with that command?

Many programs, including system utilities, are written in or indirectly powered by Python. Removing Python effectively cripples half of your system.

This used to be an issue in the Redhat flavors. You could uninstall python or bash and the system would eat itself (RHEL5 and before). Since then, they have added protections for specific packages and you can even add further protections for whatever you consider to be critical packages.

Re: Suicide Linux (2009)

#27
> Perhaps rm -rf / should be replaced with something with more verbose flags set. That way, when you run a bad command, you are told immediately that things are being deleted

This gives me an idea: Hell Linux. In Hell Linux, the operating system does its best to pretend that nothing is wrong, so it takes you as long as possible to realize that you've made a mistake. Commands ignore all unrecognized flags. In shell scripts, if one branch exits with a nonzero exit code, the other branch is taken. stderr is always redirected to /dev/null. 0 exit code is reported for all processes, no matter how they terminate. If you try to exec a file that doesn't exist, it runs a process that does nothing and immediately exits, unless it is part of a pipeline, in which case it consumes standard in. If you try to read a .json file that doesn't exist, you get the bytes "{}". When you read a log file, any lines containing "ERROR" or "WARN" are skipped. If you try to connect to a port that nothing is listening on, it does its best to behave like the service that should be listening there. Oh, the possibilities....

Re: Suicide Linux (2009)

#28
post #13

This is like that time, last week, when I was having issues with do-release-upgrade and someone helpfully suggested to run sudo apt-get purge python* && sudo apt-get autoclean && sudo apt-get install python* Which I did without paying attention to what I was doing and it turns out that this is one of the worst things you could do ever on a Debian-based distro. Damn you, abu-ahmed al-khatiri.

That's why dnf (the yum successor) has dns, sudo, systemd, systemd-udev and yum set as protected packages by default on Centos 8 (and you can't remove python withouth removing dnf/yum because of dependencies, so it should stop that as well).

I imagine apt has something similar, and maybe it's not (or wasn't) set by default on the dist you're running? If not, I would raise that as a bug with the distro, as breaking it with a command like that should be much harder to do accidentally.

Re: Suicide Linux (2009)

#29
This could be turned into a really great security tool, akin to a deadman switch, which upon activation and incorrect use, deletes the contents of the users home directory.

Example. In Mate Desktop. the default terminal is Mate Terminal. Upon installation of Suicide Linux, Mate Terminal could be modified to delete the users home, but provide no warning that it is running. For the user, they could use another terminal program for their daily needs without fear of deleting their home. In the event that their laptop is seized or stolen an attacker may use the default terminal program ie, Mate Terminal which would then upon the issue of any command delete the users home folder

If someone can make this I would install it

Re: Suicide Linux (2009)

#30
post #27

> Perhaps rm -rf / should be replaced with something with more verbose flags set. That way, when you run a bad command, you are told immediately that things are being deleted This gives me an idea: Hell Linux. In Hell Linux, the operating system does its best to pretend that nothing is wrong, so it takes you as long as possible to realize that you've made a mistake. Commands ignore all unrecognized flags. In shell sc…

This sounds like if the designers of the web made a Linux distro.
Post reply on HN