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

 

 


Tema destacado: Recopilación Tutoriales y Manuales Hacking, Seguridad, Privacidad, Hardware, etc


+  Foro de elhacker.net
|-+  Comunicaciones
| |-+  Redes
| | |-+  UDP Hole Punching
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: UDP Hole Punching  (Leído 2,895 veces)
xustyx

Desconectado Desconectado

Mensajes: 213


Ver Perfil
UDP Hole Punching
« en: 8 Diciembre 2016, 07:32 am »

Buenas,

En esta larga noche sin dormir, dando vueltas por Internet y leyendo cosas interesantes me topado con esto:

https://en.wikipedia.org/wiki/UDP_hole_punching


¿Sabéis de alguna implementación sencilla para echarle un ojo?


En línea

[Arg] $triker;


Desconectado Desconectado

Mensajes: 380


¿Yo, tóxico?


Ver Perfil WWW
Re: UDP Hole Punching
« Respuesta #1 en: 8 Diciembre 2016, 15:55 pm »

En esta larga noche sin dormir, [...]

Dormir es bueno.



Con respecto a lo otro, parece ser algo muy utilizado a juzgar por lo que veo en el artículo - según lo que dice es un protocolo para enrutar paquetes a Internet entre NATs. Dice que sirve para facilitar la comunicación por proto UDP cuando los paquetes de éste tienen que ser enrutados hacia múltiples NATs, y que no funciona en NATs simétricos.
De hecho, hay un ejemplo.

Citar
Let A and B be the two hosts, each in its own private network; NA and NB are the two NAT devices with globally reachable IP addresses EIPA and EIPB respectively; S is a public server with a well-known globally reachable IP address.

A and B each begin a UDP conversation with S; the NAT devices NA and NB create UDP translation states and assign temporary external port numbers EPA and EPB
S examines the UDP packets to get the source port used by NA and NB (the external NAT ports EPA and EPB)
S passes EIPA:EPA to B and EIPB:EPB to A
A sends a packet to EIPB:EPB.
NA examines A's packet and creates the following tuple in its translation table: {Source-IP-A, EPA, EIPB, EPB}
B sends a packet to EIPA:EPA
NB examines B's packet and creates the following tuple in its translation table: {Source-IP-B, EPB, EIPA, EPA}
Depending on the state of NA's translation table when B's first packet arrives (i.e. whether the tuple {Source-IP-A, EPA, EIPB, EPB} has been created by the time of arrival of B's first packet), B's first packet is dropped (no entry in translation table) or passed (entry in translation table has been made).
Depending on the state of NB's translation table when A's first packet arrives (i.e. whether the tuple {Source-IP-B, EPB, EIPA, EPA} has been created by the time of arrival of A's first packet), A's first packet is dropped (no entry in translation table) or passed (entry in translation table has been made).
At worst, the second packet from A reaches B; at worst the second packet from B reaches A. Holes have been "punched" in the NAT and both hosts can communicate.
If both hosts have Restricted cone NATs or Symmetric NATs, the external NAT ports will differ from those used with S. On some routers, the external ports are picked sequentially making it possible to establish a conversation through guessing nearby ports.

[Fe de erratas] Capaz que podrías hostear dos NATs en tu LAN desde tu PC (calculo que si se puede hostear un proxy y un AP en una PC, esto también se puede hacer), y practicar esto en esa circunstancia.


En línea

8Noobs - Comunidad para todos y todas, sin importar sus conocimientos en informática.

--> Unirse a 8Noobs <--
engel lex
Moderador Global
***
Desconectado Desconectado

Mensajes: 15.514



Ver Perfil
Re: UDP Hole Punching
« Respuesta #2 en: 8 Diciembre 2016, 16:25 pm »

es más o menos lo que hace el protocolo torrent... para los peer comunicarse directamente no podrán porque no hay un port forwarding por los puertos para acceder... así que el nodo le indica a 2 peer que se conectarán y usan esta tecnica

suponga que esta peer 1 y peer 2, los llamaremos p1 y p2

ambos se quieren comunicar pero no hay un port forwarding y el nat no sabrá que hacer con los paquetes entrantes, así que el nodo le comunica a p1 que p2 quiere comunicarse por el puerto de entrada XX y el puerto de salida YY

p1 abre la comunicación llamando a p2:XX desde el puerto YY
p2 abre la comunicación llamando a p1:YY desde el puerto XX

esto creará en el nat de ambos las relación tal que los paquetes pasen sin problema... este comportamiento siempre es con consentimiento de ambas partes...
En línea

El problema con la sociedad actualmente radica en que todos creen que tienen el derecho de tener una opinión, y que esa opinión sea validada por todos, cuando lo correcto es que todos tengan derecho a una opinión, siempre y cuando esa opinión pueda ser ignorada, cuestionada, e incluso ser sujeta a burla, particularmente cuando no tiene sentido alguno.
xustyx

Desconectado Desconectado

Mensajes: 213


Ver Perfil
Re: UDP Hole Punching
« Respuesta #3 en: 8 Diciembre 2016, 22:14 pm »

Gracias por la respuestas, ya estuve leyendo un poco ayer y me pareció una manera muy curiosa de saltarse la configuración del router :D

Aún así requiere de un servidor relay y eso es lo que no me gusta por que no deja de ser centralizado... pero bueno.

¿Habéis trabajado con alguna librería para GO o Java?

Me gustaría hacer una POC y programar un poquito haber que sale.
En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
WPA2-PSK Wi-Fi Cracking - Hole in the Mole Method Without any Dictionary -
Hacking Wireless
xliberaciones 3 3,513 Último mensaje 23 Septiembre 2013, 00:28 am
por sisti
Black hole exploit
Seguridad
huerto123 1 1,843 Último mensaje 21 Septiembre 2013, 18:46 pm
por r32
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines