Crontrolando los puertos abiertos (en Debian, ;-)
Hola a todos/as,
hace poco he comentado un script en Perl que "escanea" los puertos abiertos
del sistema:
http://www.rootshell.com/archive-j457nxiqi3gq59dv/199805/ss.pl.html
que genera una salida como ésta:
$ ss.pl 127.0.0.1
Scanning for all open ports on 127.0.0.1 using tcp protocol.
Verbose is off, only printing accepted connections.
tcp 127.0.0.1 9 Connection accepted.
tcp 127.0.0.1 13 Connection accepted.
tcp 127.0.0.1 21 Connection accepted.
tcp 127.0.0.1 23 Connection accepted.
tcp 127.0.0.1 25 Connection accepted.
tcp 127.0.0.1 37 Connection accepted.
tcp 127.0.0.1 79 Connection accepted.
tcp 127.0.0.1 111 Connection accepted.
tcp 127.0.0.1 113 Connection accepted.
tcp 127.0.0.1 119 Connection accepted.
tcp 127.0.0.1 512 Connection accepted.
tcp 127.0.0.1 513 Connection accepted.
tcp 127.0.0.1 514 Connection accepted.
tcp 127.0.0.1 515 Connection accepted.
tcp 127.0.0.1 6000 Connection accepted.
tcp 127.0.0.1 7100 Connection accepted.
tcp 127.0.0.1 8080 Connection accepted.
tcp 127.0.0.1 8081 Connection accepted.
Pero resulta que he encontrado otro programa que hace "lo mismo", pero en C
y "más" completo,
ftp://suburbia.net:/pub/strobe.tgz
STROBE 1.03(1) STROBE 1.03(1)
NAME
strobe - Super optimized TCP port surveyor
SYNOPSIS
strobe [ -vVmdbepPAtnSilfsaM ] [host1 ... [hostn]]
DESCRIPTION
strobe is a network/security tool that locates and
describes all listening tcp ports on a (remote) host or on
many hosts in a bandwidth utilisation maximising, and pro-
cess resource minimizing manner.
Da una salida como ésta:
$ strove -V localhost
strobe 1.03 (c) 1995 Julian Assange (proff@suburbia.net).
stats: host = localhost trys = 65535 cons = 18 time = 15.14s trys/s = 4329.13 trys/ss = 132.59
stats: hosts = 2 trys = 65535 cons = 18 time = 15.14s trys/s = 4328.37
localhost discard 9/tcp sink null
localhost daytime 13/tcp
localhost ftp 21/tcp
localhost telnet 23/tcp
localhost smtp 25/tcp mail
localhost time 37/tcp timserver
localhost finger 79/tcp
localhost sunrpc 111/tcp portmapper # RPC 4.0 portmapper TCP
localhost auth 113/tcp authentication tap ident
localhost nntp 119/tcp readnews untp # USENET News Transfer Protocol
localhost exec 512/tcp
localhost login 513/tcp
localhost shell 514/tcp cmd # no passwords used
localhost printer 515/tcp spooler # line printer spooler
localhost unknown 6000/tcp unassigned
localhost unknown 7100/tcp unassigned
localhost webcache 8080/tcp # WWW caching service
localhost tproxy 8081/tcp # Transparent Proxy
Mejor que la del modesto (pero cumplidor) script en Perl. La elección
parece fácil, pero resulta que (desde una xterm) me da salidas
"variadas". A veces no detecta los puertos 8080/8081, y tambien pasa que
asigna comentarios diferentes. Por ejemplo, para 119,
119/tcp readnews untp # USENET News Transfer Protocol
119/tcp Network News Transfer Protocol [65,PL4]
ó
6000/tcp unassigned
7100/tcp unassigned
6000/tcp X-windows server
7100/tcp X Font Service
:-?
Bueno, me ha parecido interesante dar a conocer para el que no lo supiese
la existencia de este tipo de utilidades, y esperar que alguien se anime a
probar y consiga aclarar que pasa con `strobe', :o)
Saludos.
PD: espero que Debian no tenga ya un paquete que haga esto y yo aquí
descubriendo la sopa de ajo.
--
Cosme
=============================================================
-=-=- A través de Debian GNU/Linux -=-=-
-=-=- Software Libre -=-=-
http://www.linux.org/ S.O. Multi-[plataforma, tarea, usuario]
http://www.gnu.org/ Free Software Foundation
http://lucas.hispalinux.es/ Documentación en Castellano
http://www.openresources.com/es/ Revista Open Resources
http://www.es.linuxfocus.org/Castellano/ LinuxFocus
=============================================================
Reply to: