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
enlaces:utilidades_de_red [2011/01/14 13:56] cayuenlaces:utilidades_de_red [2019/01/22 15:34] (actual) – [Parser y formateador de salida NMap] 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 336: Línea 345:
  
  
-===== Sniffers =====+===== Sniffers y mediciones =====
  
 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 395: Línea 393:
  
 http://samm.kiev.ua/sqstat/ http://samm.kiev.ua/sqstat/
 +
 +
 +==== Hydra ====
 +
 +A very fast network logon cracker which support many different services
 +
 +
 +Currently this tool supports:
 +TELNET, FTP, HTTP, HTTPS, HTTP-PROXY, SMB, SMBNT, MS-SQL, MYSQL, REXEC,
 +RSH, RLOGIN, CVS, SNMP, SMTP-AUTH, SOCKS5, VNC, POP3, IMAP, NNTP, PCNFS,
 +ICQ, SAP/R3, LDAP2, LDAP3, Postgres, Teamspeak, Cisco auth, Cisco enable,
 +AFP, Subversion/SVN, Firebird, LDAP2, Cisco AAA (incorporated in telnet module).
 +
 +For HTTP, POP3, IMAP and SMTP, several login mechanisms like plain and MD5 digest are supported.
 +
 +
 +
 +http://freeworld.thc.org/thc-hydra/
 +
 +
 +
 +
 +==== Python Proxy ====
 +
 +Mini Proxy en Python
 +
 +http://code.google.com/p/python-proxy/
 +
 +<code>
 +sergio@sergio-thinkcentre-a70z:~$ python PythonProxy.py 
 +Serving on 0.0.0.0:8080.
 +GET http://backports.debian.org/debian-backports/dists/lenny-backports/Release.gpg HTTP/1.1
 +GET http://ftp.de.debian.org/debian/dists/stable/Release.gpg HTTP/1.1
 +GET http://security.debian.org/dists/lenny/updates/Release.gpg HTTP/1.1
 +</code>
 +
 +
 +
 +==== 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 en formato dokuwiki.
 +
 +<code perl>
 +#!/usr/bin/perl
 +BEGIN {
 +    eval "use Nmap::Scanner";
 +    if ( $@ ) {
 +    warn  "Error to load module: Nmap::Scanner\n"
 +    . "Install Module:\n"
 +    . "\t\tcpan> install Nmap::Scanner\n";
 +    exit ();
 + }
 +}
 +
 +use POSIX qw(strftime);
 +my $scanner = new Nmap::Scanner;
 +$scanner->guess_os();
 +$scanner->register_scan_complete_event(\&scan_complete);
 +$scanner->register_scan_started_event(\&scan_started);
 +$scanner->register_port_found_event(\&port_found);
 +my $lista = $ARGV[0];
 +my $opciones_scan = "-sS -A -vv -p0-65535 -sV -O -iL $lista";
 +print "Options Nmap: $opciones_scan\n";
 +print "^^Puerto^Estado^Servicio^Informacion^^\n";
 +$scanner->scan($opciones_scan);
 +
 +sub scan_started {
 +        my $self     = shift;
 +        my $host     = shift;
 +        $hostname = $host->hostname();
 +        $addresses = join(',', map {$_->addr()} $host->addresses());
 +        my $status = $host->status();
 +#        print "$hostname ($addresses)\n";
 +}
 +
 +sub port_found {
 +        my $self     = shift;
 +        my $host     = shift;
 +        my $port     = shift;
 +        no warnings;
 +        my $name = $host->hostname();
 +        my $puerto = $port->state();
 +        if ($puerto eq "open"){$pestado="abierto";}
 +        elsif($puerto eq "closed"){     $pestado="cerrado";}
 +        my $proto= $port->protocol();
 +        if ($proto eq "tcp"){$protoc="tcp";}
 +        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(),"|");
 +        print "$salida_puerto\n";
 +}
 +
 +sub scan_complete {
 +    my $self = shift;
 +    my $host = shift;
 +    no warnings;
 +
 +   for my $match ($host->os()->osmatches()) {
 +        print "\n\n\nHost determinado aproximadamente: " . $match->name(),"\n\n";
 +    }
 +
 +    for my $c ($host->os()->osclasses()) {
 +#        print "-- " . $c->vendor() . "\n";
 +        print "- OS generation: " . $c->osgen() . "\n\n";
 +        print "- OS family:     " . $c->osfamily() . "\n\n";
 +        print "- OS Type:       " . $c->type() . "\n\n";
 +    }
 +}
 +</code>
 +
 +==== hping3 ====
 +**hping3** is a free packet generator and analyzer for the TCP/IP protocol. Hping is one of the de-facto tools for security auditing and testing of firewalls and networks, and was used to exploit the Idle Scan scanning technique now implemented in the Nmap port scanner. The new version of hping, hping3, is scriptable using the Tcl language and implements an engine for string based, human readable description of TCP/IP packets, so that the programmer can write scripts related to low level TCP/IP packet manipulation and analysis in a very short time.
 +
 +Like most tools used in computer security, hping3 is useful to security experts.
 +
 +hping3 should be used to… *Traceroute/ping/probe hosts behind a firewall that blocks attempts using the standard utilities. *Perform the idle scan (now implemented in nmap with an easy user interface). *Test firewalling rules. *Test IDSes. *Perform DDOS attack *Exploit known vulnerabilties of TCP/IP stacks. *Networking research. *Learn TCP/IP (hping was used in networking courses). *Write real applications related to TCP/IP testing and security. *Automated firewalling tests. *Proof of concept exploits. *Networking and security research when there is the need to emulate complex TCP/IP behaviour. *Prototype IDS systems.
 +
 +== Few commands ==
 +Finding Hping3
 +<code>
 +hping3 –h
 +</code>
 +hping3 Default
 +<code>
 +hping3 -S 192.168.1.105 -p 80
 +</code>
 +Fragment Packets with hping3
 +<code>
 +hping3 -f 192.168.1.105 -p 80
 +</code>
 +Sending Data with hping3
 +<code>
 +hping3 -f 192.168.1.105 -p 80 -d 10 -E malware
 +</code>
 +Traceroute with hping3
 +<code>
 +hping3 -z -t 1 -S google.com -p 80
 +</code>
 +Predicting Sequence Numbers with hping3
 +<code>
 +hping3 -Q -S google.com -p 80
 +</code>
 +hping3 for Uptime
 +<code>
 +hping3 --tcp-timestamp -S google.com -p 80
 +</code>
 +
 +Ref.: @cyberhawksecurity 
 +
enlaces/utilidades_de_red.1295013407.txt.gz · Última modificación: 2011/01/14 13:56 por cayu