Government Security
Network Security Resources

Jump to content

Photo

Help With Netcat In Windows

windows
  • Please log in to reply
1 reply to this topic

#1 Crumbs

Crumbs

    Private

  • Members
  • 2 posts

Posted 12 September 2012 - 04:10 AM

Hi all,

I'm doing some research, and I was playing around with netcat but I can't seem to get something.

I tried this command on a WinXP (I'm using two VMs running XP, and playing around with the connection between them):

nc -l -p 80 -e "c:\notepad.exe"
(I copied notepad.exe to c:\ folder)

But what happens is simply that netcat closes and does nothing. It does connect, because if I leave the command without the "-e" parameter like this:

nc -l -p 80

It does show me an output. But when I add the "-e" and any program (I tried cmd, and others) - nothing will execute, and netcat simply shuts down.

Any ideas?
Thanks,
Jonathan

#2 Juno

Juno

    Specialist

  • Sergeant Major
  • 142 posts

Posted 17 September 2012 - 07:06 AM

Sorry, can't explain that behavior myself. I'd recommend some basic stuff, like checking firewalls, AV turned off (or exception made for NC), but honestly I haven't needed to use NC for years. I don't know what your exact needs are, but you might also want to check psexec out:

http://technet.micro.../bb897553.aspx

Hope that helps!

Cheers,
-J
Hacking The Everyday - My blog blabberings about life, computer security, and everything in-between.
Don't forget to Read the Rules before you post!





Also tagged with one or more of these keywords: windows