sudo rm
On how many occasions have we come across the famous joke (which is more than a joke, it is a malicious act) from "sudo rm -rf" with a diagonal (I do not place it completely since someone may be confused and I warn that I am not responsible) which if a user runs it wrong on their terminal they can terminal without a single file on their system and above all being left without a system. Relating this act to Windows, it is something similar to if the user deleted the system32 folder which is something better known, but you do not know, it is basically leaving your system useless, since you are eliminating everything necessary for its operation.
The reason for mentioning this is that In Linux it is very common for users to delete a file or folder graphically, that is, by secondary clicking and “delete”, so far so good. But when you go into something more advanced or the user prefers to eliminate something from the root and completely, the "rm" command is usually used, which if used with some argument performs the task by applying some type of instruction, that is, eliminate without asking (you must be careful), delete folders and subfolders or, on the other hand, delete, but asking at all times what should be done with each file and folder.
Having already explained this a little for those newbies, whose purpose of the article is to report on a recent incident and be careful with what you install. The motivation for the article is because A few days ago the KDE developers issued a recommendation de Do not install unofficial global themes and widgets for KDE.
This recommendation was made after they learned of an incident where a user experienced deletion of all their personal files when installing the Gray Layout theme from the KDE Store, which had around 4000 downloads. It is believed that this incident was not caused by malicious intent, but rather by a bug related to the unsafe use of the “rm -rf” command.
Developers explain that KDE global themes allow the use of plasmoids that execute arbitrary commands, including those that can delete files.
This can occur when constructs like "rm -rf $VAR/*" are used in the code, which can lead to a situation where the $VAR variable is not initialized, resulting in the actual execution of the "rm -rf /*" command. ». Similar errors have been seen previously in initialization or installation scripts of other programs such as Squid, Steam, yandex-disk-indicator and bumblebee.
The specific incident occurred due to a call to the PlasmaConfSaver widget code, which includes a save.sh script designed to remove old configuration files from a previous installation. This script uses the "rm -Rf "$configFolder" command, but the code does not properly check the configuration of the $configFolder variable, whose value is passed via the command line argument ("configFolder=$2"). This can lead to situations where the value of the configFolder variable is misinterpreted, resulting in the inadvertent deletion of all user data.
To prevent this situation from occurring again in the future, the KDE developers are planning to audit third-party themes published in the KDE Store directory to identify possible errors similar to the previous incident. They are also considering adding warnings when installing themes from third-party users and evaluating the possibility of implementing pre-screening of projects hosted in the KDE Store to prevent selective placement of themes by attackers with malicious intent, such as stealing sensitive data or executing processes. to manipulate crypto wallet numbers in the KDE store clipboard.
Importantly many users are not aware that installing a theme can execute code, which can lead to a lack of attention to security when installing themes. Global themes not only affect the visual appearance, but can also modify the behavior of Plasma by including your own implementations of screen lockers and other applets that execute code. Due to resource limitations, projects in the KDE Store directory are not thoroughly verified and are published primarily on a trust basis, even though anyone can register projects in the directory.
If you are interested in knowing more about it, you can check the details in the following link