How Can I Automate Testing RDP Security Software?

0
32
Asked By CuriousCactus22 On

I'm looking for a way to automate testing my RDP connections for security software. Each week, I manually try logging into several RDP sessions, usually by entering the wrong username and password to see if the software blocks my IP as expected. While I know I could check if a port is open with Test-NetConnection, I'm struggling to find a way to script these login attempts. Is there anyone who can guide me on how to do this? Thanks in advance!

6 Answers

Answered By HackerHound42 On

I thought there were multiple tools available for this kind of task in the hacking/Linux world, but I can't pinpoint a specific PowerShell solution. Aside from using `mstsc`, you might want to look into tools like RCMan, Royal TS, or mRemoteNG to save connections.

Answered By AnonymousAvenger On

Are you already getting swamped with failed login attempts with your current setup? I wouldn't be surprised if the exposes RDP service is attracting attention.

Answered By PowerRanger77 On

Yes, you can script using `mstsc.exe`. It's a straightforward option to automate your login tests.

Answered By DevDynamo56 On

If you're not using a VPN, it's worth considering an RDP proxy or a third-party gateway like NetScaler. Just opening the port publicly isn't the safest move. I haven't found a solid solution out there that works for this specific scenario. I did come across some PowerShell scripts that deal with creating credential objects, but if the server has credential caching disabled (which it should in a secure environment), those options won't be effective.

Answered By ScriptSavvy23 On

I don't know much about a native PowerShell solution for this, but in my experience, I've used commands like `cmdkey /generic:"server-address" /user:"username" /pass:"password"` followed by `mstsc /v:server-address`, and then deleted the saved credentials. You'd need to check the output of the mstsc command to see if the connection failed. Just make sure the server supports saved logins!

Answered By TechieTina89 On

You should check out my `invoke-mstsc` function on GitHub. It might be exactly what you need for scripting those RDP logins. You can find it at 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.