Is there any defense against a forkbomb on Linux?
>>57595253
Yes.
>>57595553
Care to elaborate?
>>57595618
Don't execute them.
>>57595618
Not using linux
https://www.cyberciti.biz/tips/linux-limiting-user-process.html
ulimit
overwrite the bin files that are executed or replace keyword functionality for the operators with functionality that works on a condition.
>>57595629
"Don't do it" isn't a defense. That's like telling an attacker "don't attack my system", then telling your boss "the system is safe".
>>57595253
spoonbomb
>>57596038
It works like this in real life to. If they do attack its illigal and you should sue
>>57595253
Install OpenBSD
>>57595618
You can limit user processes so that a forkbomb won't clog up the system.
Reboot the machine
>>57595253
Just make a kernel module that limits the number of processes that can share a PPID.
If the attacker is already on your machine, you're already fucked.
>>57596334
Just because something is illegal doesn't mean it can't happen to you
>>57595618
>3DPD
>>57595618
asuka is a whore
>>57595253
>forkbomb
lol
>>57596038
The ability to run a program that is detrimental to your system is not an attack. That's like claiming the ability to shut down your PC is an attack.
On shared systems you use resource limits.
>>57596334
Declaring your system a "forkbomb-free zone" doesn't really work.
>>57599537
not using bash doesn't mean you're protected against forkbomb
>>57595618
limits.conf or ulimit
Looks like someone is lurking in
plebbit and parroting shit.
>kys
>>57595253
Make forkbombs an alias for something harmless?
>>57595253
How does it exactly work?
I mean, what do those semicolons mean?
>>57602259:() { ... }
Defines a function called ":"
; ends the previous statement (in order to do two commands on one line).
: calls the function named :
As for the content of the function:|:
This calls the function : and pipes whatever output (nothing) into a new : call
& means that the statement is forked and ran in the background
So in other words, it's a recursive function that forks every time it's called and calls itself.
>>57602295
Thanks!
>>57595253
If someone can run a forkbomb on your machine, it already means they have shell access/local code execution.
You should only run code from sources you trust. A forkbomb is the last thing an attacker would attempt on your machine. The question is meaningless.
>>57602295
Awesome.
>>57596334
>what are you gonna do, shoot me? Hah, can't you see that's illegal! You'll be sued!
>>57595253
cgroups, oom killer
>>57595253
Well, try it, you'll see.
>Hint: It won't be so easy
>>57595253
if you are not retarded you wouldn't execute what you don't understand