Herramientas de usuario

Herramientas del sitio


enlaces:utilidades_de_red

Diferencias

Muestra las diferencias entre dos versiones de la página.

Enlace a la vista de comparación

Ambos lados, revisión anteriorRevisión previa
Próxima revisión
Revisión previa
Última revisiónAmbos lados, revisión siguiente
enlaces:utilidades_de_red [2011/06/29 19:41] – [Python Proxy] cayuenlaces:utilidades_de_red [2018/11/22 16:36] – [Network Grep - ngrep] cayu
Línea 2: Línea 2:
  
 ===== Conectividad ===== ===== Conectividad =====
 +
 +==== Agregar ruta estatica ====
 +
 +<code>
 +ip route add 192.168.55.0/24 via 192.168.1.254 dev eth1
 +</code>
 +
 +<code>
 +route add -net 192.168.55.0 netmask 255.255.255.0 gw 192.168.1.254 dev eth1
 +</code>
  
 ==== Forzar el modo ethernet ==== ==== Forzar el modo ethernet ====
Línea 10: Línea 20:
 ethtool -s eth0 speed 100 duplex full autoneg off ethtool -s eth0 speed 100 duplex full autoneg off
 </code> </code>
- 
 ==== Conectarse a redes Wi Fi ==== ==== Conectarse a redes Wi Fi ====
 Primero bajamos el servicio de Network Manager si es que lo tenemos instalado Primero bajamos el servicio de Network Manager si es que lo tenemos instalado
Línea 339: Línea 348:
  
 http://es.wikipedia.org/wiki/Tipos_de_Sniffer http://es.wikipedia.org/wiki/Tipos_de_Sniffer
- 
-==== Network Grep - ngrep ==== 
- 
-Muestra y busca paquetes. Ngrep se esfuerza por proveer de la mayoría de características comunes del "grep" de GNU, aplicándolas a la capa de network ({"network layer"} del modelo de referencia OSI). ngrep es consciente de la presencia de pcap y permite usar expresiones regulares que concuerden con el "payload" ( o sea la carga, el cuerpo, y _no_ los encabezados) de los paquetes. Actualmente reconoce TCP, UDP, e ICMP sobre Ethernet, PPP, SLIP e interfaces nulas {"null interfaces"}, y comprende la lógica de un filtro "bpf" de la misma manera que herramientas más comunes de sniffing como tcpdump y snoop. 
- 
- 
-http://ngrep.sourceforge.net/ 
- 
- 
-Un posteo interesante en un blog : http://seguridadyredes.nireblog.com/post/2010/02/24/esas-pequenas-utilidades-ngrep 
- 
  
  
Línea 415: Línea 413:
  
  
-==== Netcat ==== 
  
- Netcat is a featured networking utility which reads and writes data across network connections, using the TCP/IP protocol. 
-It is designed to be a reliable "back-end" tool that can be used directly or easily driven by other programs and scripts. At the same time, it is a feature-rich network debugging and exploration tool, since it can create almost any kind of connection you would need and has several interesting built-in capabilities. 
  
-It provides access to the following main features:+==== Python Proxy ====
  
-    * Outbound and inbound connections, TCP or UDP, to or from any ports. +Mini Proxy en Python
-    * Featured tunneling mode which allows also special tunneling such as UDP to TCP, with the possibility of specifying all network parameters (source port/interface, listening port/interface, and the remote host allowed to connect to the tunnel. +
-    * Built-in port-scanning capabilities, with randomizer. +
-    * Advanced usage options, such as buffered send-mode (one line every N seconds), and hexdump (to stderr or to a specified file) of trasmitted and received data. +
-    * Optional RFC854 telnet codes parser and responder.  +
- +
- +
-The GNU Netcat is distributed freely under the GNU General Public License (GPL).  +
- +
-<code bash> +
-echo  -e "GET / HTTP/1.0\r\n" | nc 192.168.1.1 80 +
-</code> +
- +
-Referencias : +
- +
-http://netcat.sourceforge.net/ +
- +
- +
-Tutorial con ejemplos prácticos : http://crysol.org/node/28 +
- +
-==== Python Proxy ====+
  
 http://code.google.com/p/python-proxy/ http://code.google.com/p/python-proxy/
Línea 453: Línea 428:
 GET http://security.debian.org/dists/lenny/updates/Release.gpg HTTP/1.1 GET http://security.debian.org/dists/lenny/updates/Release.gpg HTTP/1.1
 </code> </code>
 +
  
  
 ==== Parser y formateador de salida NMap ==== ==== Parser y formateador de salida NMap ====
  
-Algo muy útil a la hora de hacer reporte de servidores en base a un archivo de lista de servidores, ej nmap-report.pl servidores.txt, imprimiendo la salida por pantalla.+Algo muy útil a la hora de hacer reporte de servidores en base a un archivo de lista de servidores, ej nmap-report.pl servidores.txt, imprimiendo la salida por pantalla en formato dokuwiki.
  
 <code perl> <code perl>
Línea 465: Línea 441:
     if ( $@ ) {     if ( $@ ) {
     warn  "Error to load module: Nmap::Scanner\n"     warn  "Error to load module: Nmap::Scanner\n"
-    . "Install Module:\n"        +    . "Install Module:\n"
-    . "\t\tcpan\n"+
     . "\t\tcpan> install Nmap::Scanner\n";     . "\t\tcpan> install Nmap::Scanner\n";
     exit ();     exit ();
Línea 473: Línea 448:
  
 use POSIX qw(strftime); use POSIX qw(strftime);
-$hora= strftime("%Y-%m-%d", localtime); 
- 
 my $scanner = new Nmap::Scanner; my $scanner = new Nmap::Scanner;
 $scanner->guess_os(); $scanner->guess_os();
Línea 481: Línea 454:
 $scanner->register_port_found_event(\&port_found); $scanner->register_port_found_event(\&port_found);
 my $lista = $ARGV[0]; my $lista = $ARGV[0];
-my $file = $ARGV[1]; 
 my $opciones_scan = "-sS -A -vv -p0-65535 -sV -O -iL $lista"; my $opciones_scan = "-sS -A -vv -p0-65535 -sV -O -iL $lista";
-$antes = time(); 
 print "Options Nmap: $opciones_scan\n"; print "Options Nmap: $opciones_scan\n";
-print "$lista\n";+print "^^Puerto^Estado^Servicio^Informacion^^\n";
 $scanner->scan($opciones_scan); $scanner->scan($opciones_scan);
  
 sub scan_started { sub scan_started {
- 
         my $self     = shift;         my $self     = shift;
         my $host     = shift;         my $host     = shift;
Línea 495: Línea 465:
         $addresses = join(',', map {$_->addr()} $host->addresses());         $addresses = join(',', map {$_->addr()} $host->addresses());
         my $status = $host->status();         my $status = $host->status();
- +       print "$hostname ($addresses)\n";
-        print "$hostname ($addresses)\n";+
 } }
  
 sub port_found { sub port_found {
- 
         my $self     = shift;         my $self     = shift;
         my $host     = shift;         my $host     = shift;
Línea 507: Línea 475:
         my $name = $host->hostname();         my $name = $host->hostname();
         my $puerto = $port->state();         my $puerto = $port->state();
-        if ($puerto eq "open"){$pestado="open";} +        if ($puerto eq "open"){$pestado="abierto";} 
-        elsif($puerto eq "closed"){     $pestado="closed";}+        elsif($puerto eq "closed"){     $pestado="cerrado";}
         my $proto= $port->protocol();         my $proto= $port->protocol();
         if ($proto eq "tcp"){$protoc="tcp";}         if ($proto eq "tcp"){$protoc="tcp";}
-        elsif($proto eq "udp"){$protoc="udp";         +        elsif($proto eq "udp"){$protoc="udp";
-        my $salida_puerto = join('',"|",$port->portid(),"/",$protoc,"|",$pestado,"|",$port->service()->name(),"|",$port->service()->product(),"|",$port->service()->version(),"|",$port->service()->extrainfo(),"|");+        my $salida_puerto = join('',"|",$port->portid(),"/",$protoc,"|",$pestado,"|",$port->service()->name(),"|",$port->service()->product()," ",$port->service()->version()," ",$port->service()->extrainfo(),"|");
         print "$salida_puerto\n";         print "$salida_puerto\n";
 } }
  
 sub scan_complete { sub scan_complete {
- 
     my $self = shift;     my $self = shift;
     my $host = shift;     my $host = shift;
     no warnings;     no warnings;
-    print "Host Descripcion:\n"; 
  
    for my $match ($host->os()->osmatches()) {    for my $match ($host->os()->osmatches()) {
-        print "Host could be of type: " . $match->name(),"\n<br>";+        print "\n\n\nHost determinado aproximadamente: " . $match->name(),"\n\n";
     }     }
  
     for my $c ($host->os()->osclasses()) {     for my $c ($host->os()->osclasses()) {
-        print "-- " . $c->vendor() . "\n"; +#        print "-- " . $c->vendor() . "\n"; 
-        print "- OS generation: " . $c->osgen() . "\n"; +        print "- OS generation: " . $c->osgen() . "\n\n"; 
-        print "- OS family:     " . $c->osfamily() . "\n"; +        print "- OS family:     " . $c->osfamily() . "\n\n"; 
-        print "- OS Type:       " . $c->type() . "\n";+        print "- OS Type:       " . $c->type() . "\n\n";
     }     }
- 
 } }
 </code> </code>
enlaces/utilidades_de_red.txt · Última modificación: 2019/01/22 15:34 por cayu