Herramientas de usuario

Herramientas del sitio


redes:notas:nc

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
redes:notas:nc [2018/11/01 16:29] cayuredes:notas:nc [2018/11/01 16:35] (actual) cayu
Línea 1: Línea 1:
-====== Netcat ====== +==== Netcat ==== 
-Netcat es una herramienta de red que permite través de intérprete de comandos y con una sintaxis sencilla abrir puertos TCP/UDP en un HOSTasociar una shell a un puerto en concreto y forzar conexiones UDP/TCP.+Netcat is featured networking utility which reads and writes data across network connections, using the TCP/IP protocol. 
 +It is designed to be a reliable "back-end" tool that can be used directly or easily driven by other programs and scripts. At the same time, it is a feature-rich network debugging and exploration tool, since it can create almost any kind of connection you would need and has several interesting built-in capabilities. 
 + 
 +It provides access to the following main features: 
 + 
 +    * Outbound and inbound connections, TCP or UDP, to or from any ports. 
 +    * Featured tunneling mode which allows also special tunneling such as UDP to TCP, with the possibility of specifying all network parameters (source port/interface, listening port/interface, and the remote host allowed to connect to the tunnel. 
 +    * Built-in port-scanning capabilities, with randomizer. 
 +    * Advanced usage options, such as buffered send-mode (one line every N seconds), and hexdump (to stderr or to specified file) of trasmitted and received data. 
 +    * Optional RFC854 telnet codes parser and responder.  
 + 
 + 
 +The GNU Netcat is distributed freely under the GNU General Public License (GPL).  
 +==== Ejemplos de uso ==== 
 +=== GET HTTP === 
 +<code bash> 
 +echo  -e "GET / HTTP/1.0\r\n" | nc 192.168.1.1 80 
 +</code> 
 +=== Pasar un archivo de un equipo a otros === 
 +Desde el servidor 
 +<code> 
 +cat backup.iso | nc -l 3333 
 +</code> 
 +Desde el cliente 
 +<code> 
 +nc 192.168.0.1 3333 > backup.iso 
 +</code> 
 +Si queremos poner un contador 
 +<code> 
 +nc 192.168.0.1 3333 | pv -b > backup.iso 
 +</code> 
 + 
 +Otro ejemplo 
 + 
 +Desde el servidor 
 +<code> 
 +dd if=/dev/hdb5 | gzip -9 | nc -l 3333 
 +</code> 
 +Desde el cliente 
 +<code> 
 +nc 192.168.0.1 3333 | pv -b > myhdb5partition.img.gz 
 +</code> 
 +=== Consultando puertos abiertos ===
 <code bash> <code bash>
 for port in {1..65535}; do for port in {1..65535}; do
Línea 6: Línea 48:
 done done
 </code> </code>
-  * http://adamish.com/blog/archives/567+Fuente : http://adamish.com/blog/archives/567 
 + 
 + 
 +=== Referencias === 
 + 
 +http://netcat.sourceforge.net/ 
 + 
 + 
 +Tutorial con ejemplos prácticos : http://crysol.org/node/28 
 + 
 +Mas ejemplos : http://www.g-loaded.eu/2006/11/06/netcat-a-couple-of-useful-examples/ 
redes/notas/nc.txt · Última modificación: 2018/11/01 16:35 por cayu