RDP scan fails with nsock read timeout
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- c, linux
- Domain
- networking
Research direction
The report names no source file or test. Start by reproducing the RDP timeout with the provided Ncrack command, then inspect the RDP service handling and nsock read timeout path; the build error also points to nsock/src/nsock_pcap.h and a missing pcap.h dependency. Done means identifying and fixing the cause of the RDP scan timeout, with a regression check showing the scan proceeds against a working RDP target.
Written by the indexing model from the issue text.
Description
Situation:
Testing security hardware/software from a virtual machine to a different virtual machine behind the device. I can log in to the target virtual machine from my attacker virtual machine using either xfreerdp or rdesktop, so I know RDP is working. From a Kali virtual box, I run (obviously, the command is anonymized):
ncrack -vv -d9 -user vagrant -P <password list, generated by rockyou.txt> -p rdp: 10.x.y.z -T5
The debug info shows (obviously, this is one of many iterations of the same read timeout):
rdp://10.201.200.200:33890 Pool: extract 'vagrant' 'butterfly'
rdp://10.201.200.200:33890 (EID 100) Initiating new Connection
rdp://10.201.200.200:33890 pushed to list FULL
rdp://10.201.200.200:33890 Pool: Append 'vagrant' 'justin'
rdp://10.201.200.200:33890 (EID 49) nsock READ timeout!
rdp://10.201.200.200:33890 popped from list FULL
rdp://10.201.200.200:33890 (EID 49) Attempts: total 0 completed 0 supported 0 --- rate 0.00
This is using the version of ncrack that comes with Kali Linux rolling. I tried installing the new version 0.8 by git cloning it and running the configure. When I try to make, it fails on nsock with the following errors:
In file included from nsock_core.c:86:
nsock_pcap.h:64:10: fatal error: pcap.h: No such file or directory
64 | #include "pcap.h"
| ^~~~~~~~
compilation terminated.
make[1]: *** [Makefile:48: nsock_core.o] Error 1
make[1]: Leaving directory '/home/vagrant/ncrack/nsock/src'
make: *** [Makefile:83: nsock_build] Error 2
I tried just doing the nsock/src configure and build, but got the same errors.
NOTE!!! I might just be being an idiot. This might be a simple thing I'm missing. While this is always a possibility for any user, it is a stronger likelihood with me, as I am the anti-Yogi. I am significantly dumber than the average Bear. (And also old enough to make Hannah Barbera jokes...) But any help you can offer would be deeply appreciated. Thank you.
- Dominant language
- C
- Stars
- 1.2k
- Forks
- 275
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nmap/ncrack
-
13/03/2006Open
Difficulty 5/5 Over a week Newbie friendliness 10/100
-
Build failure with OpenSSL 4.0Possibly taken @vmpyr claimed this 121 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
' Hydra brute force a Wordpress admin login hydra -L usernames.txt -P passwords.txt $ip smb -V -fOpen
Difficulty 5/5 Over a week Newbie friendliness 10/100
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
error C3861Open
Difficulty 3/5 1-2 days Newbie friendliness 48/100
Similar issues
-
severity: low
Difficulty 1/5 Under an hour Newbie friendliness 72/100
luainkernel/lunatik#2727 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 6 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
bot-triaged module: cuda module: memory usage module: pybind module: tensor creation triaged
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
pytorch/pytorch#206707 · 1 comment ·
Maintainers usually reply within 1 day
-
area/build-framework kind/enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
yugabyte/yugabyte-db#39342 ·
Maintainers usually reply within 1 day