Command line 从命令行检查远程桌面/RDP凭据(无GUI)

Command line 从命令行检查远程桌面/RDP凭据(无GUI),command-line,rdp,hydra,Command Line,Rdp,Hydra,我们目前正在编写一个工具,旨在检查各种应用程序(http、ssh、smb、rdp)上凭据的有效性。前三个没问题。但是对于RDP,我找不到一种简单的方法来实现这一点 该工具嵌入在linux设备上托管的web应用程序中,因此没有可用的X服务器 我成功地从命令行验证RDP凭据的唯一工具是THC Hydra,通过提供单个用户名和密码,它可以正确地用于旧版本的RDP服务器,尤其是那些网络级身份验证已降低的服务器 然而,在检查最新版本Windows的RDP凭据时,或者在网络级身份验证已加强的情况下,THC

我们目前正在编写一个工具,旨在检查各种应用程序(http、ssh、smb、rdp)上凭据的有效性。前三个没问题。但是对于RDP,我找不到一种简单的方法来实现这一点

该工具嵌入在linux设备上托管的web应用程序中,因此没有可用的X服务器

我成功地从命令行验证RDP凭据的唯一工具是THC Hydra,通过提供单个用户名和密码,它可以正确地用于旧版本的RDP服务器,尤其是那些网络级身份验证已降低的服务器

然而,在检查最新版本Windows的RDP凭据时,或者在网络级身份验证已加强的情况下,THC Hydra似乎挂起

Medusa的rdesktop客户端的补丁版本也失败了。(某些服务器需要CredSSP、SSL等)

还有nmap的ncrack,但由于某些原因,我只得到“读取”超时

编辑:我让Ncrack开始工作,但它失败了-至少在Windows 2008 R2上是如此(即使提供了正确的凭据,也找不到凭据)

有什么线索可以帮我吗


干杯

事实上我找到了一个可靠的方法。当你停止寻找某样东西时,你总会找到它:)

使用超级棒远程桌面客户端FreeRDP和“+auth only”开关。验证成功时,退出状态为0,否则为1。还有一条错误消息,您可以通过grep查找

身份验证失败:

jrm@deb-jrm:~$ static/xfreerdp /v:10.0.0.1 /cert-ignore /u:MyUser /MyDomain /p:WRONGPASS +auth-only
Authentication only. Don't connect to X.
credssp_recv() error: -1
freerdp_set_last_error 0x20009
Authentication failure, check credentials.
If credentials are valid, the NTLMSSP implementation may be to blame.
Error: protocol security negotiation or connection failure
Authentication only, exit status 1
Authentication only, exit status 1
有效身份验证:

jrm@deb-jrm:~$ static/xfreerdp /v:10.0.0.1 /cert-ignore /u:MyUser /MyDomain /p:GOODPASS +auth-only
Authentication only. Don't connect to X.
Authentication only, exit status 0
Authentication only, exit status 0

事实上我找到了一个可靠的方法。当你停止寻找某样东西时,你总会找到它:)

使用超级棒远程桌面客户端FreeRDP和“+auth only”开关。验证成功时,退出状态为0,否则为1。还有一条错误消息,您可以通过grep查找

身份验证失败:

jrm@deb-jrm:~$ static/xfreerdp /v:10.0.0.1 /cert-ignore /u:MyUser /MyDomain /p:WRONGPASS +auth-only
Authentication only. Don't connect to X.
credssp_recv() error: -1
freerdp_set_last_error 0x20009
Authentication failure, check credentials.
If credentials are valid, the NTLMSSP implementation may be to blame.
Error: protocol security negotiation or connection failure
Authentication only, exit status 1
Authentication only, exit status 1
有效身份验证:

jrm@deb-jrm:~$ static/xfreerdp /v:10.0.0.1 /cert-ignore /u:MyUser /MyDomain /p:GOODPASS +auth-only
Authentication only. Don't connect to X.
Authentication only, exit status 0
Authentication only, exit status 0

当它仍然尝试连接到x时,我仍然无法连接到显示器当它仍然尝试连接到x时,我仍然无法连接到显示器