Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 412 Vote(s) - 3.43 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fork Bomb

#1
The fork bomb is the equivalent of a DDoS attack on your own system. It aims to deprive the system of memory (RAM), leaving nothing for other applications or the operating system’s vital operations required to keep the systems running, hence crashing it. Just 5 characters long, the fork bomb is not permanently harmful for a computer, just annoying.

We’re now going to build on the introduction to batch files. Make sure you’ve got a VM all set up and running.

And here is the fork bomb:


Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.

Yes, this is it. The above is a shorter alternative for the following more comprehensible code:


Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.


Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.

And finally goto s brings us back to the top, forming a loop.
So every time the loop is run another instance of the same program is started and then both of them run together and again duplicate themselves and so on.
[Image: forkbomb.png]
Every program doubling itself is a form of exponential growth. After one iteration of the loop, two programs (21) are created. After another cycle, each of those two create another two for a total of four (22). After 10 iterations we have 1024 (210) instances of our little batch file. After 100 iterations we have 2100 = 1.267 nonillion, a number so big you don’t even know what ‘nonillion’ is (It’s 1030).

The first instance will likely not even complete 50 iterations before the system grinds to a halt and crashes. For such a simple script, each individual iteration would hardly take a few milliseconds, so the first few iterations complete very quickly and soon it becomes more than what the computer can handle.

Is there a way to protect against fork bombs? Yup.

Any antivirus worth it’s salt would be able to scan this suspicious executable file and warn the user before execution. As a fork bomb’s mode of operation is entirely dependent on being able to create new processes, one way of preventing a fork bomb from severely affecting the entire system is to limit the maximum number of processes that a single user may own. On Linux, this can be achieved by using the ulimit utility; for example, the command ulimit -u 30 would limit the affected user to a maximum of thirty owned processes.

And so we have our first little virus under our belt. Head over to the next one to continue or scroll down if you’re interested in checking out the code for fork bomb in other common languages.

Bash

Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.

Python

Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.

Java

Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.

Ruby


Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.

C


Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.

JavaScript


Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.

The following version is easier for injection (XSS):


Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.

And the following is simply a more aggressive version of the above:

Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.

Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through