Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow setting RDP AuthenticationLevel to prevent NLA error 2825 #875

Open
JRVcr opened this issue Jan 31, 2018 · 17 comments
Open

Allow setting RDP AuthenticationLevel to prevent NLA error 2825 #875

JRVcr opened this issue Jan 31, 2018 · 17 comments
Labels
Enhancement A new feature or improvement to an existing feature.
Milestone

Comments

@JRVcr
Copy link

JRVcr commented Jan 31, 2018

When connecting to a remote server via RDP that requires Network Level Authentication, I get--

RDP disconnected!
2825 The remote computer requires Network Level Authentication, which your computer does not support. For assistance, contact your system administrator or technical support.

This began with installation of v1.75.7012.16814.

|Operating system | Windows 10 x64 |
|mRemoteNG version| 1.75.7008 |

@simoncreasey
Copy link

I have the same NLA Error 2825.
It's a clean install so don't know if this scenario worked previous to the update.

mRemoteNG v1.75.7012.16814
Windows 10 1709 OS Build 16299.248

Happy to test an update/fix.
Thanks.

@sparerd
Copy link
Contributor

sparerd commented Feb 14, 2018

Do you have Use CredSSP enabled for that connection (Protocol section in the config window)?

@JRVcr
Copy link
Author

JRVcr commented Feb 14, 2018 via email

@sparerd
Copy link
Contributor

sparerd commented Feb 14, 2018

I would recommend attempting a connection from mRemoteNG with CredSSP turned on. According to the CredSSP protocol specification, the client and sever do not need to be on the same domain for the protocol to work. All it does is provide a TLS connection during authentication and help with selecting an authentication protocol that both hosts support.

I admit it seems odd that this issue cropped up after updating mremoteng though.

@JRVcr
Copy link
Author

JRVcr commented Feb 14, 2018 via email

@simoncreasey
Copy link

Hi David, I concur this works. I had tried with CredSSP in both states but this was combined with bad credentials so confused the result.

Thanks for your prompt suggestion.
Simon.

@sparerd
Copy link
Contributor

sparerd commented Feb 14, 2018

Glad to hear that worked for both of you. I learned something as well - had to do a bit of digging to figure out what credssp was really doing for us.

I've created issue #885 to look into improving the error message for rdp error 2825.

@JRVcr
Copy link
Author

JRVcr commented Feb 15, 2018 via email

@sparerd
Copy link
Contributor

sparerd commented Feb 15, 2018

The only AxMstsc property we set based on the Use CredSsp value is _rdpClient.AdvancedSettings7.EnableCredSspSupport (RdpProtocol.cs:151). Related documentation page here: https://msdn.microsoft.com/en-us/library/gg130858(v=vs.85).aspx

The only somewhat related value seems to be _rdpClient.AdvancedSettings5.AuthenticationLevel (RdpProtocol.cs:143) which we currently hardcode to 0. Related documentation here: https://msdn.microsoft.com/en-us/library/aa380846(v=vs.85).aspx. Though this seems to be more about authenticating that the server is valid via certs than requesting creds from a client.

I cant find any property that specifically references NLA.

It may be that the AxMstsc library lacks the distinction between CredSSP and NLA.

@JRVcr
Copy link
Author

JRVcr commented Feb 16, 2018 via email

@sparerd
Copy link
Contributor

sparerd commented Feb 16, 2018

Np @JRVcr, there may be work-arounds for it or something I'm still missing, so I'll keep this open for a bit. I am doing a bit of work on our RDP components next release so I may take a look at this again

@JRVcr
Copy link
Author

JRVcr commented Feb 16, 2018 via email

@guidez
Copy link

guidez commented Jun 13, 2018

@sparerd The afore mentioned Authentication Level property https://msdn.microsoft.com/en-us/library/aa380846(v=vs.85).aspx should in fact be the reference to NLA you are looking for. The equivalent is "authentication level:i:n" for .RDP files (as referenced to here), where "n" can be any of the levels described in https://msdn.microsoft.com/en-us/library/aa380846(v=vs.85).aspx

If you're hard-coding the value to 0, end-users will not be able to connect to systems set with the "Allow connections only from computers running Remote Desktop with Network Level Authentication" option enabled on the remote system. Unless something changed though, requiring NLA should be off by default in Windows (so it's not a common need), but it can be enabled locally and/or via GPO.

Thus, _rdpClient.AdvancedSettings5.AuthenticationLevel should be made into a configurable flag with a default of 0 to keep current functionality while allowing end-users to alter the setting when needed.

@sparerd
Copy link
Contributor

sparerd commented Jun 13, 2018

Thanks for clarifying @guidez. We can get this added as a configurable option with a default of '0' as you've suggested. I'll tentatively add this to the v1.77 release. That release is getting a bit full, but this change is fairly straight forward.

@sparerd sparerd added the Enhancement A new feature or improvement to an existing feature. label Jun 13, 2018
@sparerd sparerd added this to the 1.77 milestone Jun 13, 2018
@sparerd sparerd changed the title NLA error 2825 Allow setting RDP AuthenticationLevel to prevent NLA error 2825 Jun 13, 2018
@JRVcr
Copy link
Author

JRVcr commented Jun 14, 2018 via email

@guidez
Copy link

guidez commented Jun 16, 2018

@JRVcr Wouldn't go so far as to say it's a "near-universal need": Search for "windows 2012 nla", and you'll find most of the links are for requests to turn NLA off on remote end-points.

You are correct though, MSTSC does not provide an option to alter the AuthenticationLevel setting from the GUI itself, but it is a simple tweak in a saved RDP file to alter the setting.

Having a flag for this could be a moderately useful diagnostic tool, but something that most users will not want to have to fuss with, any more than they do with MSTSC.

The point of the flag is to just move away from the currently hardcoded variant and give end-users the option to alter it when needed. If we're just talking about truly imitating native MSTSC/.RDP file functionality, I'd concur that the default value for _rdpClient.AdvancedSettings5.AuthenticationLevel should be 2, but perhaps on a later release?

The hardcoded variant has been 0 for who knows how long, and introducing it as both a configurable option and altering the current hardcoded/default value in one go might make some heads spin.

edit

To clarify, changing the value from 0 to 2 will potentially cause an additional prompt on the end-users side of things, so while it's the "native" MSTSC experience, it's not native to the mRemoteNG experience.

0: No authentication of the server.
2: Attempt authentication of the server. If authentication fails, the user will be prompted with the option to cancel the connection or to proceed without server authentication.

Really Microsoft should have added a fourth option... "3": Attempt auth, if auth fails, continue automatically. But Microsoft did... well it did what Microsoft does.

@sparerd
Copy link
Contributor

sparerd commented Jun 19, 2018

@guidez You make a good point about the default value. Retaining the '0' default value provides an easy transition for users who are not affected by this issue. We don't want to 'break' existing functionality unless we have a good reason.

For users who will always want NLA, they can set the default connection info property to '2'. Newly created connections will have NLA turned on.

The largest issue will come for users who need NLA turned on for many connections. Because we do not yet support mass editing of connections, users will have to do a find & replace of the XML file or edit each individual connection in the app. Though this would be an issue with whichever default value we chose.

Another downside is that users who do still need NLA will receive that somewhat unhelpful error message. We can mitigate this drawback by improving the error message. Best practice is to (1) inform the user what went wrong and (2) include several suggestions for how to fix it or how to troubleshoot further. Currently this error message (and most of our error messages actually..) lacks that 2nd part.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement A new feature or improvement to an existing feature.
Projects
Version 1.77
  
To do Bugs-Security
Development

No branches or pull requests

4 participants