1

See the reference image below. When issuing commands to a bash shell via a netcat connecting using UDP only the first character of the command seems to make it to the server. Moreover, after entering the command a second newline is required.

Why does this behavior occur? What is the proper way to create a shell using netcat+udp?

Example of broken UDP behavior

I'm using GNU Netcat 0.7.1 by Giovanni Giacobbi

2
  • What version of Linux are you using for this? Netcat is a bit different across the various distributions and can effect the behavior of some flags. Commented Mar 22, 2011 at 16:02
  • Trying the flags you are using with /bin/nc.traditional under Ubuntu I get nothing when using the UDP flag not the single character issue you are seeing. But works fine with TCP. Commented Mar 22, 2011 at 16:19

2 Answers 2

1

Have a quick look at a related netcat query on serverfault here - this may help. UDP does not behave as well as TCP.

0

"iodine lets you tunnel IPv4 data through a DNS server. This can be usable in different situations where internet access is firewalled, but DNS queries are allowed."

http://code.kryo.se/iodine/

1
  • 1
    Thanks for the info. iodine looks like an interesting tool. However in this case I want to know the technical reason for netcat's strange behavior, I'm not looking for alternatives.
    – Casey
    Commented Mar 23, 2011 at 14:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .