-
April 25th, 2004, 06:14 PM
#1
Netcat remote shell
When I give the command nc -L -d -p (port #) -e cmd.exe and try to connect later using
nc -v (ip address) (port #) i cannot get a shell. the -d option makes nc run in detached mode which means that it runs in the background and the command window can be closed, and it will not show in task mngr...right? i have done a lot of research and for some damn reason i cannot get the ****er to connect. your help will be greatly appreciated!
thanxs
-
April 26th, 2004, 09:48 AM
#2
It should work. Do you have a firewall running on the host you are connecting to?
Oliver's Law:
Experience is something you don't get until just after you need it.
-
April 26th, 2004, 02:09 PM
#3
It is possible that you have a version with the -e option disabled.
-e
Executes a program if netcat is compiled with the
–DGAPING_SECURITY_HOLE.
http://www.skynet.ie/~syfer/tutorials/netcat.htm
That is, the -e option has to be enabled at compile time.
If you downloaded the executable already compiled,
check their documentation.
Also, check, and double check your syntax. It's easy to type
the commands incorrectly.
I came in to the world with nothing. I still have most of it.
-
April 26th, 2004, 04:42 PM
#4
I just tested your line (verbatum) and it worked on my W2K with nc 1.1. With all due respect, you're entering > nc {ip} {port} from the machine you're trying to connect from? Also, if you haven't done this before, you may be connecting without knowing it -- from your connecting box, try IPCONFIG to see which "window" you're in.
Also, can you confirm a listener on your given port with netstat -an ?
Depending on the system, I sometimes have to specify the address (with -s) otherwise, it'll listen on 0.0.0.0 instead of the real IP.
Cheers!
-
April 26th, 2004, 04:55 PM
#5
try eliminating the space between the -e and cmd.exe on the server (-ecmd.exe) the same for the port. and BTW it will show in task manager even detached from a console but you can rename the executable to mask its presence.
if you d/l ed it from @stake the -e option has been compiled in.
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.’”
-
May 1st, 2004, 01:46 AM
#6
thanx
it's working, thanks...
i ended up having to do nc -v -l -d -e cmd.exe -p {port} -s {ip}
this got netcat listening with the detached window and no problem connecting.
i have tried all sorts of combo's and this is the only one i can get to work correctly.
thanx for the help...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|