next up previous contents
Next: Conclusions Up: Implementation Previous: Attaining low ports with   Contents


Auto-looping

Consider the following case:


#!/usr/bin/perl
use ProtoWrap;

my $wrap = ProtoWrap->new('standalone' => 1,
			  'listenPort' => 3000,
			  'destType'   => 'ip',
			  'destAddr'   => '127.0.0.1',
			  'destPort'   => 3000
			  );
die 'Can\'t start SMTP wrapper' if (not defined $wrap);
$wrap->startServer() or warn "Can't start wrapper";

exit 0;

We have here a wrapper that will connect to itself. Any user could launch it, because it binds to a high port. Nothing unusual would happen right away, but as soon as the first packet for that port arrives, a cascade of fork() system calls will fall down on the system, effectively making it unusable after just a couple of seconds.

The author, however, decided not to prevent users from doing this -- it would require huge amounts of code, slowing down normal execution, and it could always be circumvented by altering little bits of this sample invocation. Users to local access to a computer can very easily create DoS conditions without resorting to ProtoWrap -- Consider any of the following examples:

They are all much simpler to implement than the first one, much more effective and harder to notice.


next up previous contents
Next: Conclusions Up: Implementation Previous: Attaining low ports with   Contents
Gunnar Wolf
2001-03-12