Results 1 to 8 of 8

Thread: Netcat and Telnet

  1. #1
    Senior Member
    Join Date
    May 2004
    Posts
    206

    Netcat and Telnet

    Ok. I have one computer on my LAN ("host") running this batch file:
    cd c:\
    c:\nc.exe -t -d -w 30 -p 36960 -l < c:\nc.exe
    I have another computer ("client") running this batch file:
    c:\windows\system32\nc.exe 192.168.1.102 36960 >> c:\nc.exe
    The problem is, when I change c:\windows
    system32\nc.exe to telnet, it won't download the file correctly. Does anyone know why this is?
    It is better to die on your feet than to live on your knees.

  2. #2
    AO Curmudgeon rcgreen's Avatar
    Join Date
    Nov 2001
    Posts
    2,716
    telnet cannot download files, so it won't work as a substitute for nc.exe.
    I came in to the world with nothing. I still have most of it.

  3. #3
    Senior Member
    Join Date
    Apr 2002
    Posts
    634
    Yes. When you use the -t switch with netcat, you emulate a telnet behavior, but it will not change your little NetCat server in a Telnet server.

    In fact, your server side command simply send automatically your file, without dealing with telnet commands to send and receive it.
    Life is boring. Play NetHack... --more--

  4. #4
    Senior Member
    Join Date
    Dec 2003
    Location
    Pacific Northwest
    Posts
    1,675
    Jareds411,

    It appears you are trying to open a port using netcat, then use telnet to transfer a file. Interesting, but no can do. Besides, Netcat can transfer files on it’s own.

    Unless the file you indicated on your post was just an example, the file you are trying to push/pull between the two machines by use of the redirects <, >>, is nc.exe.

    quote:
    cd c:\
    c:\nc.exe -t -d -w 30 -p 36960 -l < c:\nc.exe

    quote:
    c:\windows\system32\nc.exe 192.168.1.102 36960 >> c:\nc.exe

    Just for info, in order to setup Netcat for file transfer, Netcat must already be installed on the both machines and then open your listening port.

    Here’s the syntax after the connection has been made:

    For the source: nc [192.168.1.102] 36960 < [file]

    For the receiving: nc –l –p 36960 > [file]

    You can push or pull the file. Hope that helps.

    cheers

    Edit: doggon folks beat me to the post again.....lol

  5. #5
    Senior Member
    Join Date
    May 2004
    Posts
    206
    Thanks for the info. And, yea, I was just using c:\nc.exe as an example.
    It is better to die on your feet than to live on your knees.

  6. #6
    Senior Member
    Join Date
    Feb 2004
    Posts
    270

    Yust me talking.

    It may be smart not to store a program like netcat in a folder like c:\windwos\system32.

    I know you can than execute it without it's path. But this also count for anything and anyone else.
    Since the beginning of time, Man has searched for the answers to the big questions: \'How did we get here?\' \'Is there life after death?\' \'Are we alone?\' But today, in this very theatre, you will be asked to answer the biggest question of them all...WHO LIVES IN A PINEAPPLE UNDER THE SEA?

  7. #7
    Senior Member
    Join Date
    Nov 2001
    Posts
    4,785
    if someone has access to your system32 folder locally or threw a remote shell having nc there is a moot point.
    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.’”

  8. #8
    Ummm does it really matter that much? Take a fine look at TFTP, FTP, & (ect). With echo and debug alone I could edit any file I want, make and run scripts, create a hex dump with echo and convert the hex-dump into its normal form useing debug. Deppending... in some situations I could also control browsers under command promt and have explorer download and run what ever I wanted.

    Anytime you download random exploits and have remote shell to a computer, gotten someone to download and run a file of your choice, or simply asked some Joe Blow kiddie to do things for you under command promt because this would make 'em a l33t h4xor (Hang around in some chat place and you'll find dozens of these guys in seconds) , anways... anytime stuff like this happens then you've already offically & royally screwed peaple one way or the other... with or without netcat.

Posting Permissions

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