enlaces:utilidades_de_red
Diferencias
Muestra las diferencias entre dos versiones de la página.
Ambos lados, revisión anteriorRevisión previaPróxima revisión | Revisión previaPróxima revisiónAmbos lados, revisión siguiente | ||
enlaces:utilidades_de_red [2010/12/17 18:06] – cayu | enlaces:utilidades_de_red [2018/11/01 16:35] – [Netcat] cayu | ||
---|---|---|---|
Línea 2: | Línea 2: | ||
===== Conectividad ===== | ===== Conectividad ===== | ||
+ | |||
+ | ==== Agregar ruta estatica ==== | ||
+ | |||
+ | < | ||
+ | ip route add 192.168.55.0/ | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | route add -net 192.168.55.0 netmask 255.255.255.0 gw 192.168.1.254 dev eth1 | ||
+ | </ | ||
==== 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 | ||
</ | </ | ||
- | |||
==== 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 |
http:// | http:// | ||
Línea 343: | Línea 352: | ||
Muestra y busca paquetes. Ngrep se esfuerza por proveer de la mayoría de características comunes del " | Muestra y busca paquetes. Ngrep se esfuerza por proveer de la mayoría de características comunes del " | ||
+ | |||
+ | |||
+ | Usage examples: | ||
+ | |||
+ | < | ||
+ | ngrep '' | ||
+ | |||
+ | ngrep '' | ||
+ | |||
+ | ngrep '' | ||
+ | |||
+ | ngrep '' | ||
+ | |||
+ | ngrep ' | ||
+ | |||
+ | ngrep -iq 'rcpt to|mail from' tcp port 25 (monitor current delivery and print sender and recipients) | ||
+ | |||
+ | ngrep ' | ||
+ | |||
+ | ngrep -q ' | ||
+ | Microsoft operating system?) | ||
+ | |||
+ | ngrep -iq ' | ||
+ | |||
+ | ngrep ' | ||
+ | |||
+ | ngrep ' | ||
+ | |||
+ | ngrep -v '' | ||
+ | |||
+ | ngrep -d le0 '' | ||
+ | </ | ||
+ | |||
+ | |||
+ | Useful flags: | ||
+ | |||
+ | < | ||
+ | -A n (prints out " | ||
+ | |||
+ | -l (pipe the output of ngrep to another program for more processing) | ||
+ | |||
+ | -v (print all lines not matching the expression) | ||
+ | |||
+ | -d (specify the device you want to monitor) | ||
+ | </ | ||
Línea 364: | Línea 418: | ||
# tcptrack -i eth0 port 80 | # tcptrack -i eth0 port 80 | ||
# tcptrack -i eth0 host 192.168.2.110 and port 8080 | # tcptrack -i eth0 host 192.168.2.110 and port 8080 | ||
+ | # | ||
</ | </ | ||
Línea 394: | Línea 449: | ||
http:// | http:// | ||
+ | |||
+ | |||
+ | ==== 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/ | ||
+ | |||
+ | For HTTP, POP3, IMAP and SMTP, several login mechanisms like plain and MD5 digest are supported. | ||
+ | |||
+ | |||
+ | |||
+ | http:// | ||
+ | |||
+ | |||
+ | |||
+ | ==== MSN Dump ==== | ||
+ | |||
+ | Sniffea eh interpreta lo que va por el puerto 1863 :p | ||
+ | |||
+ | <code perl> | ||
+ | # | ||
+ | # quick dirty msn sniffer | ||
+ | # http:// | ||
+ | # $Id: msndump.pl, | ||
+ | |||
+ | #To capture live traffic from device eth0 run: | ||
+ | #msndump.pl -i eth0 | ||
+ | |||
+ | #To capture from tcpdump traffic.pcap file run: | ||
+ | #msndump.pl -r traffic.pcap | ||
+ | |||
+ | # you need Net::Pcap and Net::Packet | ||
+ | # use cpan or get manually | ||
+ | # http:// | ||
+ | # http:// | ||
+ | |||
+ | my $lowuid=' | ||
+ | my $lowgid=' | ||
+ | |||
+ | my $filter = 'tcp and port 1863'; | ||
+ | |||
+ | # no modify below | ||
+ | use Getopt:: | ||
+ | use Net::Pcap; | ||
+ | use NetPacket:: | ||
+ | use NetPacket:: | ||
+ | use Fcntl; | ||
+ | $|=1; | ||
+ | my $flags |= O_NONBLOCK; | ||
+ | |||
+ | my %opts; | ||
+ | getopt(" | ||
+ | if ( (!($opts{i})) && (!($opts{r})) ) { | ||
+ | print "[ msndump - miscname.com ]\n Usage: | ||
+ | exit; | ||
+ | } | ||
+ | |||
+ | if ((!$opts{r}) && ($> != ' | ||
+ | die ("you need uid 0\n"); | ||
+ | } | ||
+ | |||
+ | # main loop | ||
+ | my $exitvar = ' | ||
+ | while ($exitvar == ' | ||
+ | |||
+ | # create pcap | ||
+ | my $pcap = & | ||
+ | if (!($pcap)) { | ||
+ | die ("cant capture\n" | ||
+ | } | ||
+ | |||
+ | # drop privs | ||
+ | my $GID=" | ||
+ | my $UID=" | ||
+ | my $EGID=" | ||
+ | |||
+ | # -w if set | ||
+ | if ($opts{w}) { | ||
+ | open (FILEOUT,"> | ||
+ | fcntl(FILEOUT, | ||
+ | } | ||
+ | |||
+ | # capture loop | ||
+ | if (($opts{c}) && ($opts{c} =~ /(\d+)/)) { | ||
+ | print " | ||
+ | | ||
+ | $exitvar = ' | ||
+ | } else { | ||
+ | | ||
+ | my %stats; | ||
+ | Net:: | ||
+ | print "saw $stats{ps_recv} packets, dropped $stats{ps_drop}\n"; | ||
+ | } | ||
+ | |||
+ | # free it | ||
+ | print " | ||
+ | Net:: | ||
+ | # close fh | ||
+ | if ($opts{w}) { | ||
+ | print "wrote $opts{w}.\n"; | ||
+ | close FILEOUT; | ||
+ | } | ||
+ | } | ||
+ | |||
+ | # sub procs below | ||
+ | sub cap_pkt { | ||
+ | |||
+ | my ($pcap, | ||
+ | my $snaplen = 14096; # seen some big im's :( | ||
+ | my $promisc = 1; # promisc of course | ||
+ | my $timeout = 0; # timeout | ||
+ | |||
+ | # file.pcap? | ||
+ | if ($opts{r}) { | ||
+ | print " | ||
+ | $pcap = Net:: | ||
+ | if (!($pcap)) { | ||
+ | | ||
+ | } | ||
+ | } else { | ||
+ | |||
+ | # set dev from cmdline | ||
+ | $dev = $opts{i}; | ||
+ | print " | ||
+ | |||
+ | # get netmask for filter | ||
+ | if ((Net:: | ||
+ | die (" | ||
+ | } | ||
+ | | ||
+ | # open it | ||
+ | $pcap = Net:: | ||
+ | if (!($pcap)) { | ||
+ | die (" | ||
+ | } | ||
+ | } | ||
+ | |||
+ | # sanity check | ||
+ | if (!($pcap)) { | ||
+ | die (" | ||
+ | } elsif (!($mask)) { | ||
+ | $mask = ' | ||
+ | } | ||
+ | |||
+ | # make filter struct | ||
+ | if (Net:: | ||
+ | die (" | ||
+ | } | ||
+ | # apply | ||
+ | Net:: | ||
+ | |||
+ | return $pcap; | ||
+ | } | ||
+ | |||
+ | sub proc_pkt { | ||
+ | |||
+ | my($user_data, | ||
+ | my ($user, | ||
+ | |||
+ | my $ip_obj = NetPacket:: | ||
+ | #my $ip_obj = NetPacket:: | ||
+ | |||
+ | # check if its a message (or a p2p file transfer) | ||
+ | # if your reading this, include ' | ||
+ | if (($ip_obj-> | ||
+ | ; | ||
+ | } else { | ||
+ | print $ip_obj-> | ||
+ | # extract goodies | ||
+ | if ( (($ip_obj-> | ||
+ | $user = " | ||
+ | } | ||
+ | |||
+ | if ($ip_obj-> | ||
+ | $msg = $1; | ||
+ | } | ||
+ | |||
+ | # display if we have both | ||
+ | if (($user) || ($msg)) | ||
+ | { | ||
+ | | ||
+ | { | ||
+ | $user = " | ||
+ | } | ||
+ | if (!($opts{w})) { | ||
+ | print " | ||
+ | print " | ||
+ | print " | ||
+ | } else { | ||
+ | print FILEOUT " | ||
+ | print FILEOUT " | ||
+ | print FILEOUT " | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | ==== Python Proxy ==== | ||
+ | |||
+ | Mini Proxy en Python | ||
+ | |||
+ | http:// | ||
+ | |||
+ | < | ||
+ | sergio@sergio-thinkcentre-a70z: | ||
+ | Serving on 0.0.0.0: | ||
+ | GET http:// | ||
+ | GET http:// | ||
+ | GET http:// | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ==== 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, | ||
+ | |||
+ | <code perl> | ||
+ | # | ||
+ | BEGIN { | ||
+ | eval "use Nmap:: | ||
+ | if ( $@ ) { | ||
+ | warn "Error to load module: Nmap:: | ||
+ | . " | ||
+ | . " | ||
+ | exit (); | ||
+ | } | ||
+ | } | ||
+ | |||
+ | use POSIX qw(strftime); | ||
+ | my $scanner = new Nmap:: | ||
+ | $scanner-> | ||
+ | $scanner-> | ||
+ | $scanner-> | ||
+ | $scanner-> | ||
+ | my $lista = $ARGV[0]; | ||
+ | my $opciones_scan = "-sS -A -vv -p0-65535 -sV -O -iL $lista"; | ||
+ | print " | ||
+ | print " | ||
+ | $scanner-> | ||
+ | |||
+ | sub scan_started { | ||
+ | my $self = shift; | ||
+ | my $host = shift; | ||
+ | $hostname = $host-> | ||
+ | $addresses = join(',', | ||
+ | my $status = $host-> | ||
+ | # print " | ||
+ | } | ||
+ | |||
+ | sub port_found { | ||
+ | my $self = shift; | ||
+ | my $host = shift; | ||
+ | my $port = shift; | ||
+ | no warnings; | ||
+ | my $name = $host-> | ||
+ | my $puerto = $port-> | ||
+ | if ($puerto eq " | ||
+ | elsif($puerto eq " | ||
+ | my $proto= $port-> | ||
+ | if ($proto eq " | ||
+ | elsif($proto eq " | ||
+ | my $salida_puerto = join(''," | ||
+ | print " | ||
+ | } | ||
+ | |||
+ | sub scan_complete { | ||
+ | my $self = shift; | ||
+ | my $host = shift; | ||
+ | no warnings; | ||
+ | |||
+ | for my $match ($host-> | ||
+ | print " | ||
+ | } | ||
+ | |||
+ | for my $c ($host-> | ||
+ | # print "-- " . $c-> | ||
+ | print "- OS generation: " . $c-> | ||
+ | print "- OS family: | ||
+ | print "- OS Type: " | ||
+ | } | ||
+ | } | ||
+ | </ |
enlaces/utilidades_de_red.txt · Última modificación: 2019/01/22 15:34 por cayu