Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

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

share|improve this question
    
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. –  Mark Davidson Mar 22 '11 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. –  Mark Davidson Mar 22 '11 at 16:19
    
What is the positive value of answering this question? It seems to be asking for help in attacking systems. Is that really appropriate here? It seems inappropriate to me. I'd tend to suggest that this question be deleted/closed. –  D.W. Mar 25 '11 at 5:49
add comment

2 Answers

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

share|improve this answer
add comment

"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/

share|improve this answer
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 Mar 23 '11 at 14:37
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.