elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Introducción a la Factorización De Semiprimos (RSA)


  Mostrar Temas
Páginas: [1]
1  Seguridad Informática / Seguridad / Iptables "extraño" en router Comtrend en: 7 Agosto 2010, 12:12 pm
Configurando mi router ADSL+ he encontrado algo inusual a lo que no le encuentro una explicación razonable.

El router es un Comtrend 5365

He reconfigurado el firewall integrado para aceptar y rechazar algunos puertos que necesito. He activado el syslog a un equipo remoto y aquí es donde ha saltado la "alarma".

Yo defino los puertos que quiero filtrar y me encuentro que me añade 2 filtros adicionales que no aparecen en la lista de filtrado de IP y que yo no he configurado nunca.

El Log del router cuando arranca da me muestra esto:

Aug  5 00:03:53  syslog: iptables -I INPUT 1 -j ACCEPT -i ppp_8_32_1 -p tcp --dport 30005
Aug  5 00:03:53  syslog: iptables -I FORWARD 1 -j ACCEPT -i ppp_8_32_1 -p tcp --dport 30005
Aug  5 00:03:54  syslog: iptables -I INPUT 1 -j ACCEPT -i ppp_8_32_1 -p udp -s 192.168.0.1/24 --dport 30006
Aug  5 00:03:54  syslog: iptables -I FORWARD 1 -j ACCEPT -i ppp_8_32_1 -p udp -s 192.168.0.1/24 --dport 30006
(...)


Básicamente está permitiendo (sin que yo lo haya definido así) que acepte conexiones desde internet y hacia internet por esos puertos. TCP 30005 en destino y UDP 30006 en mi red. Con independencia de lo que el usuario decida.


Me cuelo en el equipo y hago un sysinfo && sh para acceder a la consola del BusyBox, Un iptalbles me da esto:


> sysinfo && sh
Number of processes: 33
 11:52am  up 2 days, 11:49,
load average: 1 min:0.00, 5 min:0.00, 15 min:0.00
              total         used         free       shared      buffers
  Mem:        13912        13340          572            0          840
 Swap:            0            0            0
Total:        13912        13340          572


BusyBox v1.00 (2009.07.09-10:31+0000) Built-in shell (msh)
Enter 'help' for a list of built-in commands.

# iptables -L -v
Chain INPUT (policy ACCEPT 2415 packets, 333K bytes)
 pkts bytes target     prot opt in     out     source               destination        
    0     0 ACCEPT     udp  --  ppp_8_32_1 any     192.168.0.0/24       anywhere            udp dpt:30006
    2    84 ACCEPT     tcp  --  ppp_8_32_1 any     anywhere             anywhere            tcp dpt:30005

    0     0 ACCEPT     tcp  --  ppp_8_32_1 any     anywhere             anywhere            tcp dpt:XXXXXX
    0     0 ACCEPT     tcp  --  ppp_8_32_1 any     anywhere             anywhere            tcp dpts:XXXXX:XXXXX
    0     0 ACCEPT     tcp  --  ppp_8_32_1 any     anywhere             anywhere            tcp dpt:XXXXX
    0     0 ACCEPT     tcp  --  ppp_8_32_1 any     anywhere             anywhere            tcp dpt:XXXXXX
    0     0 ACCEPT     tcp  --  ppp_8_32_1 any     anywhere             anywhere            tcp dpt:XXXXX
  341 18120 ACCEPT     tcp  --  ppp_8_32_1 any     anywhere             anywhere            tcp dpt:XXXXXX
   30  1724 DROP       tcp  --  ppp_8_32_1 any     anywhere             anywhere            tcp dpt:XXXX
    0     0 DROP       tcp  --  ppp_8_32_1 any     anywhere             anywhere            tcp dpt:XXXX
    0     0 DROP       tcp  --  ppp_8_32_1 any     anywhere             anywhere            tcp dpt:XXXXX
    0     0 DROP       tcp  --  ppp_8_32_1 any     anywhere             anywhere            tcp dpt:XXXXXXX
 8168  650K ACCEPT     all  --  ppp_8_32_1 any     anywhere             anywhere            state RELATED,ESTABLISHED
  366 18492 LOG        tcp  --  ppp_8_32_1 any     anywhere             anywhere            tcp flags:SYN,RST,ACK/SYN limit: avg 6/hour burst 5 LOG level alert prefix `Intrusion -> '
 5395  413K DROP       all  --  ppp_8_32_1 any     anywhere             anywhere            

Chain FORWARD (policy ACCEPT 1503K packets, 194M bytes)
 pkts bytes target     prot opt in     out     source               destination        
    0     0 DROP       all  --  br0    any     anywhere             224.0.1.24          
    0     0 DROP       all  --  br0    any     anywhere             239.255.255.254    
    0     0 DROP       all  --  br0    any     anywhere             239.255.255.250    
    0     0 ACCEPT     udp  --  ppp_8_32_1 any     192.168.0.0/24       anywhere            udp dpt:30006
    0     0 ACCEPT     tcp  --  ppp_8_32_1 any     anywhere             anywhere            tcp dpt:30005

 1951  265K ACCEPT     tcp  --  ppp_8_32_1 any     anywhere             anywhere            tcp dpt:www
    0     0 ACCEPT     tcp  --  ppp_8_32_1 any     anywhere             anywhere            tcp dpts:XXXXXX:XXXXX
    0     0 ACCEPT     tcp  --  ppp_8_32_1 any     anywhere             anywhere            tcp dpt:XXXXXX
    0     0 ACCEPT     tcp  --  ppp_8_32_1 any     anywhere             anywhere            tcp dpt:XXXXXX
 3060  191K ACCEPT     tcp  --  ppp_8_32_1 any     anywhere             anywhere            tcp dpt:XXXXXX
  856  133K ACCEPT     tcp  --  ppp_8_32_1 any     anywhere             anywhere            tcp dpt:XXXXXX
35573 2077K TCPMSS     tcp  --  any    ppp_8_32_1  anywhere             anywhere            tcp flags:SYN,RST/SYN TCPMSS clamp to PMTU
35761 2052K TCPMSS     tcp  --  ppp_8_32_1 any     anywhere             anywhere            tcp flags:SYN,RST/SYN TCPMSS clamp to PMTU
1929K 1838M ACCEPT     all  --  ppp_8_32_1 any     anywhere             anywhere            state RELATED,ESTABLISHED
    6   304 LOG        tcp  --  ppp_8_32_1 any     anywhere             anywhere            tcp flags:SYN,RST,ACK/SYN limit: avg 6/hour burst 5 LOG level alert prefix `Intrusion -> '
    6   304 DROP       all  --  ppp_8_32_1 any     anywhere             anywhere            

Chain OUTPUT (policy ACCEPT 19770 packets, 1127K bytes)
 pkts bytes target     prot opt in     out     source               destination        
#


(los puertos XXXXXX son los que yo he definido pero están ofuscados por seguridad).

La configuración del firewall que se configuran por el interfaz web es esta:

Incoming IP Filtering Setup

By default, all incoming IP traffic from the WAN is blocked when the firewall is enabled. However, some IP traffic can be ACCEPTED by setting up filters.

Choose Add or Remove to configure incoming IP filters.

Filter Name   VPI/VCI   Protocol   Allow/Deny   Source Address / Mask   Source Port   Dest. Address / Mask   Dest. Port   Remove
ServidorLinuxXXX   8/32   TCP   Allow               XXXX   
ServidorLinuxXXX   8/32   TCP   Allow               XXXX   
RHelpSrv   8/32   TCP   Allow               XXXX   
RHelpd2   8/32   TCP   Allow               XXXX   
RDesktopVar   8/32   TCP   Allow               XXXX:XXXX   
ServidorXXX   8/32   TCP   Allow               XXXX   




Un scan de puertos desde internet marca como abierto el 30005 (de ahí los dos paquetes del listado anterior)

La pregunta es:

¿Para que abre el router esos puertos sin "mi consentimiento"?
No hay forma, sin colarse al router, de eliminar esas dos lineas IPtables.

En la mayoría de los sitios, los puertos TCP/30005 y UDP 30006 están asociados a troyanos.

Es más, desde internet, con el navegador apuntas a http://[mi url o mi direccion ip]:30005 y te aparece un prompt de login (IgdAuthentication). Carga una página en blanco le pongas lo que le pongas (o eso, o no le vale el usuario/password del router).

Supongo que habrá una explicación razonable, pero no la encuentro y me resulta extraño. Es como si el firmware del router por defecto añadiese siempre esas dos líneas, con independencia de la decisión del usuario en cuanto a filtrado de paquetes.

Ah, el router es de Telefónica.

Páginas: [1]
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines