Questions tagged [netcat]

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.

Filter by
Sorted by
Tagged with
1
vote
0answers
28 views

Connection refused, but port is open

My Idea was to make netcat-Connection between two devices in different LAN; Now I looked in settings of WiFi-Router and created a port forwarding; port 4004 of router should now be able to connect me ...
0
votes
0answers
22 views

Why am I having trouble connecting to my service remotely through public ip ( appears to be dependent on the listening service/protocol )?

I am trying to set up port forwarding rules for a couple of different services so that I can connect to them remotely but I am having some difficulty. I have tested different services/scenarios and ...
0
votes
1answer
50 views

Bypass Linux password login with netcat or ssh or telnet

How can you bypass a password login with nc or ssh? I type 'nc IP-address 13880' and it gives me the login form I need to bypass. Can anyone give me any tips?
0
votes
0answers
26 views

ettercap uppon valid NetCat connection

I created and opened a nc connection between a host machine and a virtual machine, and when I ran on the VM nc -v x.x.x.x 666 -c "sudo ettercap -T" I saw this output on my host machine: Sat Mar ...
0
votes
1answer
55 views

Use netcat to listen on a port and send output from a command when a client connects

I have a Raspberry Pi (Debian Linux) connected to my LAN that can read data from some connected devices and output it to STDOUT. Let's say the program is run on "Server" and I want to serve the ...
2
votes
0answers
35 views

How to transfer files between two hosts through a bastion using netcat and pigz

I have to regularly transfer the contents of folders containing a lot of small files with a volume of around 10GB from one server to another. Before I used the command bellow which did the job very ...
0
votes
2answers
82 views

Scan open port with netcat

I'm just wrapping my head around the utility netcat. So for test purpose I install Apache on my Linux OS and verified Apache runs by accessing the localhost url in my browser. I want to test if the ...
0
votes
0answers
20 views

Having issues with netcat connecting to external port

I'm in a situation where I don't understand whats's happening. The attacker machine is an android running from mobile wifi running termux and I type in this command: nc -nvlp 4444 On the other hand ...
0
votes
0answers
174 views

CTF challenge. How to receive full flag using netcat?

Im trying to dip my toes a bit more into networking, pentesting etc and i might have a slightly vague question but i hope one of you are able to help I'm trying to poke at a CTF that were made by ...
0
votes
1answer
137 views

linux nc (netcat) UDP Connection refused

I faced with some strange nc behavior. It works well with TCP when on one host I do: nc -tlp 31337 and on the other one: nc 14.0.0.1 31337 So there can be some data exchange. But when I do: nc -...
0
votes
0answers
39 views

Interacting with continuous netcat session from bash script

I need to make a bash script to open the netcat session, then read server messages and after every message send a response depending on the message, so the responses cannot be pre-written to a file. ...
0
votes
1answer
40 views

Netcat listening on Debian Security advice please nc -(dknl)

I would be very grateful for some help: This is with regards to a Netcat based script running on a Debian based distribution, specifically the Proxmox hypervisor (see here if unknown https://en....
0
votes
1answer
93 views

SSH'ing through a proxy with CentOS 8

I'm using CentOS 8, and I'm trying to SSH from behind a firewall through a (HTTP but also somehow SOCKS) proxy. I've read this answer, which suggests using nc -X - but my nc doesn't support that. I'...
0
votes
0answers
25 views

How to resume a file transfer using netcat or socat or curl?

I have to transfer a 400Gb database consisting of a single file over the Internet from a server where I have full control to an other computer at the opposite border of the ocean (but which uses a ...
0
votes
0answers
19 views

How to check where the data come from by using NetCat?

I just need a way to check where the data come from ( what is the source ip address ). I used this command: nc localhost 12345 But I only get the data and not the sourse ip address. Any idea?
0
votes
0answers
12 views

herestring causing netcat to hang?

I have netcat bound to a socket, listening on tcp port 5555: Server nc -vvlp 5555 -e /bin/bash An incoming connection from a remote host, with a herestring: Client nc $server_ip 5555 <<<'...
1
vote
1answer
93 views

Install both gnu-netcat and openbsd-netcat simultaneously on Arch Linux

They are in conflict when I try to install them conveniently. How can I have both of them at the same time?
0
votes
1answer
30 views

Receive UDP packets from multiple broadcast servers

I have two sensors which broadcast their data using UDP. I configured them to use different ports. If I connect only one sensor, I receive the packets using nc -ul port without any trouble. If I ...
2
votes
1answer
184 views

What's the alternative to “nc -l” for HTTPS?

You can run netcat in the "listen" mode: nc -l 8080 This will listen on localhost:8080, dump everything that comes in to stdout and reply with data from netcat's stdin. This is useful for a quick ...
0
votes
0answers
52 views

Netcat/nc messages not send/received on either computer

I have two computers (both running Ubuntu) in the same network. They are able to ping each other successfully. Their IPs are: Computer 1: 172.16.10.59 Computer 2: 172.16.10.72 The following works: ...
7
votes
1answer
6k views

what is the difference between telnet and netcat?

I am looking for an explanation where I can find the difference between telnet and netcat. In which cases should I use telnet and netcat. What a telnet can do that netcat can not do and vice versa. I ...
0
votes
1answer
178 views

Scanning streamed data with clamav

I am trying to come up with a command with which I can scan a file by streaming it via network interface. I have tried the following: telnet clamd.server.com 3310 STREAM PORT <some random ...
0
votes
2answers
598 views

Is NetCat command dangerous?

I'm s server-side developer and used to invoke the nc command to check whether a remote port is open. Suddenly, the security guy prohibited the command and as soon as I use the nc command my ...
0
votes
1answer
189 views

Netcat as a inetd service on port 1815 and redirect incomming to /dev/ttyS2

I'm trying to let my Debian 7 system to listen on port 1815 with netcat and redirect the incoming traffic to a VacuumFluorecentDisplay. Iptables are open and I'm using inetd instead of xinetd(came ...
1
vote
0answers
462 views

Why does this netcat pipeline work in macOS but not Linux?

I set up the following pipeline. This allows me to see the raw HTTP requests and responses that pass through the pipeline. Note: I use BSD nc below (this is what comes with macOS and AmazonLinux), ...
0
votes
0answers
48 views

Pipe netcat response to php post form

I'm trying to get a one-line command that pipes all messages on a port to a php script. I can't use a netcat proxy, as the receiving end is webserver-only. Basically, I have the idea of doing ...
0
votes
0answers
90 views

My Raspberry Pi can’t detect or connect to open ports made by Netcat with my Debian virtual machine

I want to establish a connection over a network protocol like TCP/UDP using Netcat with my Debian virtual machine (using VirtualBox) as the host while my Raspberry Pi connects to the virtual machine. ...
1
vote
0answers
287 views

How do I stream UDP raspivid over ipv6 from raspberry pi to my debian virtual machine mplayer

I can stream UDP raspivid to my host machine fine using ipv4 but my project needs to be able to stream over ipv6. I tested my ipv6 connection via netcat-openbsd and I've confirmed my debian host ...
2
votes
1answer
748 views

UDP with netcat on Mac OS

I try to connect to a Tello drone from my Mac by opening an UDP connection to 192.168.10.1 via port 8889 to send commands and receive ack's from the device. When using "Packet Sender" it works, but ...
0
votes
3answers
2k views

listening port with netcat not working

I am trying to listen to port 8080 using netcat. It was working fine, suddenly I an getting this. Any idea? root@kali:~# nc -vv -l -p 8080 retrying local 0.0.0.0:8080 : Address already in use ...
0
votes
0answers
50 views

why would a LAN transfer go slower when router is connected to network

Before I ask, I realize the different hardware might be at play but I did some other tests that make me think its not the hardware and I wanted to ask to see if maybe there is something else going on. ...
0
votes
3answers
3k views

Use netcat to tell a remote Mac to run/open a file

I have very limited (almost no) knowledge of how netcat works other than I've managed to get one Mac mini to listen on port 13370 [using nc -l 13370] (for TCP commands?) and I have a MacBook that has ...
0
votes
1answer
132 views

Apply jumphost's .bashrc to server during ssh from client?

With the following topology: +----------+ ssh -J +--------+ +--------------+ |clienthost| =========> |jumphost| ====> |restrictedhost| +----------+ +--------+ ...
0
votes
1answer
567 views

Corrupt .zip file after being downloaded by Netcat

I create a .zip file with WinRAR on my Windows, it can be opened and extracted on Linux as well as Windows if I transfer it via mail or any other common way. But when I transfer it via Netcat, the ...
0
votes
2answers
1k views

Receiving multiple files at once in Netcat without overwriting last file

1 machine listens(linux), while multiple clients(windows) send files to it on one and the same listening port. Netcat receives the files serially with the -k tag. Listening machine: nc -lp PORT -k ...
0
votes
0answers
144 views

Why is my TCP connection attempt via PHP acting weird?

I'm not sure if this is better here or on SO but since the issue isn't in the programming I figured it applies here (or on U&L or on serverfault, but I guess/hope I'm fine on here). I want to ...
2
votes
1answer
85 views

Shell pipes - the order of things

Because netcat on my box doesn't support -e, The netcat man page gives me this workaround: $ rm -f /tmp/f; mkfifo /tmp/f $ cat /tmp/f | /bin/sh -i 2>&1 | nc -l 127.0.0.1 1234 > /tmp/f I ...
1
vote
1answer
416 views

can't reach nginx port with netcat

I have this simple nginx config file: server { listen 4000; location / { root /usr/share/nginx/html; index index.html index.htm; try_files $uri $uri/ /index.html =404; } } nginx ...
1
vote
2answers
1k views

Use rsync with nc as transport layer

By default, rsync uses ssh as a transport layer. Unfortunately with fast local network, ssh is very slow. Is it possible use rsync with netcat / nc ? I have make some experiments, but it does not ...
0
votes
0answers
723 views

How to enable inbound connection on Windows 7 firewall for a program?

I have two computers on my network: one Linux machine and one Windows 7 machine. I run a nc -l 8888 on the Windows 7 machine and I run a nc -nv 8888 on my Linux machine to connect to my ...
0
votes
1answer
1k views

check multiple ports using netcat nc

I'm using the follow to wait till a port opens. while ! nc -z 127.0.0.1 8080; do sleep 0.1; done how can the above be modified to check multiple ports. So the script should stop only when all ports ...
0
votes
2answers
1k views

How to use nc to listen on a TCP port indefinitely?

I want to read the data arriving on a specific TCP port indefinitely and dump the data into a file. I have tried many different variations of nc but it is not working out for me. For the most part I ...
1
vote
1answer
1k views

Create HTTP proxy using netcat?

Is it possible to use nc as an HTTP proxy? I'm hoping to use nc on a VPS as an HTTP proxy and configure my browser to use the netcat server. Is this possible? A few results for googleing "netcat http ...
3
votes
1answer
3k views

How to make `nc` listen on a port without setting `SO_REUSEPORT`

I want to have a nc command listen on a TCP port so I did: nc -lv 8888 Then in another console I checked if another program trying to listen on the same port would get an Address already in use type ...
2
votes
0answers
449 views

unable to start a bind shell with ssl on ncat

Ncat: Version 7.10 i tried this with other version as well no luck. this is the cmd i gave to start listener. If I don't start the bind shell then this listener works without any issues and if i don'...
4
votes
4answers
13k views

How to send binary data in netcat to an already established connection?

I can do the following to send binary data in netcat: echo -e '\x80' | nc host port But I don't want to do it like this, what I want is to connect to a server: nc 192.168.1.115 12345 And then send ...
0
votes
1answer
8k views

Connection timed out for netcat after opening port in router

So, my situation is that I have one Windows PC and one PC with Kali Linux. On Windows PC I've opened a netcat listener on port 4444. Then on my router I've opened port 4444. Finally when I go on kali ...
1
vote
1answer
900 views

Get Netcat Output, Process and Input All In One Connection

Say I do nc example.com 1234 and it returns two numbers split by a newline, which I must add together and input back in to it. The numbers change if I close the connection, so how would I get the ...
0
votes
1answer
86 views

Unable to reach computer in same network

Assume two machines that connect to a wireless router (Archer C7 v2) and are part of the same LAN. Pinging machine A from machine B works, but ssh, telnet, netcat fail. Why? Details Machine A (...
1
vote
2answers
62 views

Cannot make a TCP connection on private network

I am testing the local connection between two OS X computers using netcat. They are both connected to the same router (through wifi) and have the same public IP, so I believe they have access to the ...