Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
linux:evil [2008/11/21 17:23] a some evil l00nix code |
linux:evil [2013/01/04 11:31] (current) a |
||
---|---|---|---|
Line 22: | Line 22: | ||
: | : | ||
+ | |||
+ | |||
+ | <note tip> | ||
+ | \\ | ||
+ | This is very easy to defend against. All you need to do is set limits to the number of processes that a user can open. These can be set per user, per group or globally. And you can set this one of two ways. | ||
+ | |||
+ | You can use the ulimit command for instant change that only lasts until the user logs off, or make the change permanent by editing the / | ||
+ | |||
+ | To use the ulimit command simply type “ulimit -u” with the number of processes that you want users to be allowed to run. So to set the limit to 512 just type: | ||
+ | |||
+ | sudo ulimit -u 512 | ||
+ | |||
+ | You can also change the ''/ | ||
+ | |||
+ | < | ||
+ | * hard nproc 512 | ||
+ | </ | ||
+ | |||
+ | The “*” means apply the change to everyone, “Hard” means it is a hard limit, and “nproc 512″ locks the number of processes to 512. | ||
+ | |||
+ | You need to adjust the number of processes to a number that would be the best setting for your system. 512 seemed to work great on mine. Don’t set the number to low, or you may have other “denial of service” type issues, lol. | ||
+ | |||
+ | more: http:// | ||
+ | </ | ||