Netcat is a simple but powerful utility program that reads and writes data across network connections, using TCP or UDP protocol, IPv4 or IPv6, with a variety of functions.

learn more… | top users | synonyms

-2
votes
2answers
450 views

Meaning of “netcat can be used as a backdoor” [closed]

I recently read about netcat and it is often mentioned that it could be used as a "backdoor". What exactly is meant by backdoor? Could some one give an example of such usage of netcat.
2
votes
1answer
428 views

How to pipe the output of a linux command back into the predecesssing command

The linux command nc -l 8090 | (read METHOD URI PROTOCOL ; echo "method: $METHOD" ; echo "path: $URI" ; echo "prot: $PROTOCOL") listens to port 8090 and when I type something like ...
2
votes
2answers
895 views

Use netcat as a proxy to log traffic

I want to use netcat as a proxy to log http requests and responses to files, then tail these to inspect traffic. Think wireshark. Tried the following where 'fifo' is a named pipe, 'in' and 'out' are ...
2
votes
1answer
606 views

Unix bidirectional pipe on commandline

I've been able to use this linux command to connect Netcat to a serial port: nc -l 80 <> /dev/ttyS0 I would like to be able to log this transaction. My backup plan is to use Wireshark to ...
0
votes
3answers
1k views

Using nc (netcat) to emulate NTP server response

I want to test some security on an NTP client developed in-house and would like to use netcat to do it. I have packets captured with Wireshark from previous NTP exchanges that I tried to feed to the ...
0
votes
3answers
901 views

How do I make netcat receive UDP packets from any host?

Is there a way to make netcat receive UDP packets from any ip:port? I don't want it to bind to a specific host as the first packet comes. I can consider alternatives, but they have to be bash ...
0
votes
1answer
419 views

TCP connection to my host's public IP address using Linux netcat

I need to make a TCP connection to my machine through an application that needs only the public IP address and port to connect. I have been able to do it in Windows, but I need to do it in Linux ...
3
votes
1answer
3k views

Why is “nc -l xxxx” not opening a port?

I'm trying to get netcat to listen on port 4444, but it doesn't seem to be working. I am checking to see if the port is open using nmap, but it doesn't pick it up and I can't figure out why. I have ...
0
votes
2answers
587 views

How do I send and receive simultaneously with netcat?

I need to test a TCP server by connecting with netcat as a client sending a stream from /dev/random and at the same time pipe the output to /dev/null. Receiving: nc 127.0.0.1 3000 > /dev/null ...
9
votes
1answer
6k views

Can the Telnet/Netcat client communicate over SSL?

I would like to test client connections with IMAP over SSL, HTTPS, and other secure text-based Internet protocols over SSL/TLS, the same way I would using Telnet or Netcat if they were not tunneled ...
0
votes
1answer
926 views

netcat and tee redirection via a bash script

Quick question that has been haunting me all day.. I have a bash script that includes this line: nc -l 8044 | tee nc-output & The output from netcat is never being written to nc-output. If I ...
6
votes
1answer
2k views

How can I force netcat to send my input immediately, not just on newlines?

How can I force netcat to send my input immediately, not just on newlines? I want to test an HTTP parser manually and check how it behaves when header lines are spread across multiple packets.
2
votes
1answer
2k views

How to get the WAN IP from a router using UPnP/SSDP

I'm trying to find a way to get my router to report back my WAN IP using UPnP/SSDP, but so far I have been unable to even get a list of UPnP supporting internet access devices on my network. Here's ...
0
votes
0answers
1k views

Port forwarding on D-link DIR-615 router

I'm attempting to configure my router to forward a port to my Linux machine. The Linux computer has a static IP (192.168.0.185) Right now I'm just experimenting to make sure I can forward a port, so ...
0
votes
1answer
737 views

Can I use nc and/or stunnel to make a transparent SSL proxy such that I can specify the outgoing source port?

I've been playing around a bit with different variations and can't seem to find something that quite works. I want to be able to 'bridge' an SSL connection across a particular gateway node in the ...
1
vote
2answers
388 views

How to set up a secure chat using netcat

I use netcat to chat in LAN. PC1 listen port 8080 $ nc -l -p 8080 PC2 connect to PC1:8080 $ nc 192.168.10.1 8080 Unfortunately, this is not secure. Anyone sniffing packets can intercept my ...
2
votes
1answer
2k views

bidirectional socat functionality with nc

This is question is somehow related to How is it called when listening(connecting) two sockets and exchanging data between them? In the test setup I have three terminal windows open I run in Term1: ...
6
votes
1answer
1k views

versions of netcat

I've tried the two main versions of netcat : GNU and BSD. (mine is BSD Version). On GNU version, the command $ nc -l -p 12345 works fine but with BSD, option -l (listen) can't be used in conjonction ...
1
vote
1answer
223 views

Can I use dd to clone two drives from two machines simultaneously?

To clarify, I have two machines: Machine1 and Machine2. Each machine has 2 disks (Machine1 has Disk1-1 and Disk1-2; simiarly, Machine2 has Disk2-1 and Disk2-2). Can I use 'dd' to clone Disk1-1 to ...
1
vote
2answers
5k views

Netcat/socat behavior with piping and UDP?

I guess this is close to linux - Netcat stops listening for UDP traffic - Super User, but I thought I'd better ask anyways As far as versions of netcat I'm using Ubuntu 11.04 and the default netcat ...
0
votes
1answer
259 views

cat file that contains escaped characters to netcat

I'm trying to test a webserver with some HTTP request written in a file. GET / HTTP/1.1\r\n\r\n Right now I'm feeding that file to netcat like this: cat files | nc localhost 80 However, the \r\n ...
2
votes
1answer
178 views

Monitoring incoming requests on a web hosting server

I have a web hosting account with GoDaddy (its a Linux based hosting). Can I install applications like netcat to monitor all incoming requests to my website on a certain port? If not, is there any ...
1
vote
1answer
5k views

Linux built-in or open source program to join multicast group?

I'm using tcpdump to capture multicast packets and had to code up a custom program to join multicast feeds so tcpdump will "see" the packets. Just wondering if netcat or any other applications can ...
0
votes
2answers
1k views

nc or socat: How to read data from remote:/dev/ttyACM0?

I have a device running at a remote computer on /dev/ttyACM0 Now I want to read that data on my computer. I can connect to it over ssh. Unfortunately I am a nc/socat rookie and no howto covered this. ...
0
votes
1answer
515 views

How to purge connections left open by SSH ProxyCommand?

I have a webserver WWW1 and a front-facing proxy PRX. I use SSH ProxyCommand to connect to WWW1's internal IP (private IP) via PRX (private+public IP). For some connections (not all) I see a network ...
2
votes
1answer
3k views

Terminal command to send data (plain text string) to a port at a remote computer

I am trying to send data (plain text string) to a port at a remote computer using terminal utility. The string would be used to trigger something on the remote computer running a program that would ...
1
vote
1answer
473 views

Simple secured SFTP tunnel?

I'd like to setup an sftp tunnel so that I can connect to an IP-secured SFTP server through a gateway computer from anywhere, and download the files to anywhere. I was thinking of using a combination ...
1
vote
1answer
1k views

Netcat file transfer problem

I have two custom scripts I just wrote to facilitate transferring files between my VPS and my home server. They are both written in bash (short & sweet): To send: #!/bin/bash SENDFILE=$1 PORT=$2 ...
6
votes
1answer
16k views

Netcat on Mac OS X

Is anybody else not able to get nc -lp 8888 working on Mac OS X? Is there another way to get this to work?
8
votes
2answers
11k views

Sending file via netcat

I'm using something like this to send file from one computer to another: To serve file (on computer A): cat something.zip | nc -l -p 1234 To receive file (on computer B): netcat server.ip.here. ...