How Can I Automate Testing RDP Security Software?

0
0
Asked By CuriousCat97 On

I'm tasked with testing multiple RDP connections weekly, which involves logging in with incorrect credentials a few times to ensure that our RDP security software effectively blocks my IP address. While ideally, these machines would be on a VPN, it's not always feasible for various reasons. I can confirm if the port is open using Test-NetConnection, but I'm looking for a way to automate the login attempts through scripting. I've done some research but haven't found any viable solutions. Any guidance would be appreciated! Thanks!

5 Answers

Answered By ScriptingNinja34 On

I haven't found a native PowerShell solution, but in the past, I used this method:
```
cmdkey /generic:"server-address" /user:"username" /pass:"password"
mstsc /v:server-address
cmdkey /delete:server-address
```
Make sure you check the command's exit code to determine if you failed to connect. Just make sure the remote server allows saved credentials!

Answered By LinusXpert On

I thought there were various hacking tools or Linux options for this, but I don't know of a PowerShell method. Other than mstsc, there are tools like RCman, Royal TS, or mRemoteNG that can manage your connections and might help.

Answered By RDPWiz01 On

Are you not already seeing a lot of failed login attempts with it exposed like this?

Answered By SavantCoder On

Yes, you can definitely script the use of mstsc.exe! It's a viable approach.

Answered By CodeMaster007 On

Check out my `invoke-mstsc` function on GitHub! It's designed exactly for what you need. Here’s the link: https://github.com/ztrhgf/LAPS

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.