how to use netcat?
Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: how to use netcat?

  1. #1
    Junior Member
    Join Date
    Mar 2002
    Posts
    10

    Thumbs up how to use netcat?

    I typed:
    nc -v -L -e cmd.exe -p 139 -s xxx.xxx.xxx.xxx but i didn't get anything on the next row. What happened with that. Was I blocked by the network policy?

    Thx

    g00rkha


  2. #2
    Senior Member
    Join Date
    Jan 2002
    Posts
    458
    My best guess is that it is because you tried to bind cmd.exe to port 139 which is already in use by Windows for Netbios...

    Try using a different port

  3. #3
    Junior Member
    Join Date
    Oct 2001
    Posts
    13
    I agree, what are your perm's on the system though?

    Kelvin://
    Random number generation is just too damn important to be left up to chance!

  4. #4
    Senior Member
    Join Date
    Nov 2001
    Posts
    1,255
    Well, normally if Netcat can't bind a port it gives an error message like:
    Can't bind xxx.xxx.xxx.xxx:139: Port in use or some other similar error.

    Personally, I don't think you should be running cmd.exe off of any listening connection anyways... You're obviously just out to setup a backdoor, so I don't see why anyone here should be helping you.
    Chris Shepherd
    The Nelson-Shepherd cutoff: The point at which you realise someone is an idiot while trying to help them.
    \"Well as far as the spelling, I speak fluently both your native languages. Do you even can try spell mine ?\" -- Failed Insult
    Is your whole family retarded, or did they just catch it from you?

  5. #5
    Senior Member
    Join Date
    Nov 2001
    Posts
    4,786
    i believe you told netcat to be a server, listen on port 139 and give a command promt when anyone connects. if you don't get a prompt back thats what its doing.

    chsh is right, you should be using another port like 443
    Bukhari:V3B48N826 “The Prophet said, ‘Isn’t the witness of a woman equal to half of that of a man?’ The women said, ‘Yes.’ He said, ‘This is because of the deficiency of a woman’s mind.’”

  6. #6
    Junior Member
    Join Date
    Mar 2002
    Posts
    10
    Does it mean I still can use this port (139) because the service (sorry if i'm not mistaken) give Netcat priority over NETBIOS service which is at a lower priority because it is bound to ANY IP address? Because of I bind I bind "in front of" some services that may be listening on the port.

  7. #7
    Junior Member
    Join Date
    Mar 2002
    Posts
    10
    I tried to use port 443 but it gave me the message that I could not bind with the port. Thanks.

  8. #8
    Senior Member
    Join Date
    Jan 2002
    Posts
    458
    two things..

    First, no netcat will not have a higher priority than netbios. When a service is bound to a port, the only way to get rid of it is to kill the process.

    Second, If you set up the listener and you get a blank line and your prompt does not return, that probably means the listener is waiting for a connection. To verify this open another window and type

    unix: netstat -na |grep <netcat port>
    windows: netstat -na |more --> and just look for the port netcat is using.

    Make sure that port is in "listening" state

    Like I said earlier though...try using a high port that will not conflict with any already in use....something like 23456.

    Once the port is listening, open another session and try:

    telnet <target.ip> <port #>

  9. #9
    Junior Member
    Join Date
    Nov 2001
    Posts
    8
    Try a higher port.

    c:\>nc -d -l -p 6000 -e cmd.exe

  10. #10
    Junior Member
    Join Date
    Feb 2002
    Posts
    18
    X11R6 is already running on port 6000 ...
    Look at your local /etc/services !!!
    Love your country, but
    never trust its government. -- Robert A. Heinlein

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •