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

Various TLS changes #193

Merged
merged 8 commits into from
Mar 25, 2020
Merged

Various TLS changes #193

merged 8 commits into from
Mar 25, 2020

Conversation

Res260
Copy link
Collaborator

@Res260 Res260 commented Mar 18, 2020

See #192.

  • Enable TLS 1.2 support between MITM and RDP Server
  • Lock pyopenssl version to avoid breaking changes
  • Disable TLS 1.3 for both client MITM and server MITM to avoid "cannot decrypt after the fact" scenarios.

I believe the current code has probably been copied without thinking about this argument, but it limits the TLS versions that PyRDP can use for TLS.

For context: for the TLS 1.3 disable: #116

I have tested on my machine, but further investigation is required. If something is not clear hmu.

Fixes #192. Workaround for #116.

@Res260 Res260 requested review from obilodeau and alxbl March 18, 2020 03:50
@Res260
Copy link
Collaborator Author

Res260 commented Mar 18, 2020

After further reading:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=784153

SSLv23_METHOD is the wildcard tls method and will use any available TLS version in OpenSSL. This probably should stay like this for CLIENT --> MITM. Thoughts @obilodeau ? I'll add a comment because this constant name is pure garbage.

@Res260 Res260 changed the title Enable TLS 1.2 support between MITM and RDP Server and remove old SSL version support between RDP Client and MITM Enable TLS 1.2 support between MITM and RDP Server Mar 18, 2020
@Res260
Copy link
Collaborator Author

Res260 commented Mar 18, 2020

Alright ready for review now

@Res260 Res260 changed the title Enable TLS 1.2 support between MITM and RDP Server Enable TLS 1.2 support between MITM and RDP Server and lock pyopenssl version to avoid breaking changes Mar 18, 2020
@Res260
Copy link
Collaborator Author

Res260 commented Mar 18, 2020

Small change: Lock PyOpenSSL version to avoid breaking changes ( https://www.pyopenssl.org/en/stable/changelog.html ) (despite https://www.pyopenssl.org/en/stable/backward-compatibility.html )

@Res260 Res260 changed the title Enable TLS 1.2 support between MITM and RDP Server and lock pyopenssl version to avoid breaking changes Various TLS changes Mar 18, 2020
@Res260
Copy link
Collaborator Author

Res260 commented Mar 18, 2020

Last change (i, too, gotta sleep): Disable TLS 1.3 (see main comment for context).

@alxbl
Copy link
Collaborator

alxbl commented Mar 18, 2020

I don't think we should close #116 by disabling support for TLS 1.3. There will come a time where it will become necessary. I agree with disabling TLS 1.3 negotiation while we don't properly support it, but I don't feel that's a fix, only a workaround until we can handle 1.3 properly.

Other than not closing #116, this looks good to me.

@Res260
Copy link
Collaborator Author

Res260 commented Mar 18, 2020

Yeah I wasnt sure what was the best approach, I thought we should open a new issue for TLS 1.3 support which would be an enhancement issue instead of a bug-ish issue. I can remove the fixes statement though no problem

Edit I see you already edited the comment haha

@Res260
Copy link
Collaborator Author

Res260 commented Mar 24, 2020

@obilodeau do you want to review or I can merge?

@alxbl alxbl added this to the vNext milestone Mar 24, 2020
@obilodeau
Copy link
Collaborator

@Res260 reviewing now

Copy link
Collaborator

@obilodeau obilodeau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good. Minor comments. I'll let you react or change then I'll merge.

Also, from now on, we should collect pcaps for TLS issues and add them as integration tests.

pyrdp/core/ssl.py Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
@Res260
Copy link
Collaborator Author

Res260 commented Mar 25, 2020

Also, from now on, we should collect pcaps for TLS issues and add them as integration tests.

This might require more work than it seems, as the current integration test purposely avoids TLS testing (because neither me nor @xshill used TLS with scapy).

@obilodeau
Copy link
Collaborator

This might require more work than it seems, as the current integration test purposely avoids TLS testing (because neither me nor @xshill used TLS with scapy).

Fair point. I missed that. Well, I'll try if we ever have a regression in the future and give up eventually then 😉. Let's not track that in an issue so we don't feel bad about ourselves 😄

@Res260
Copy link
Collaborator Author

Res260 commented Mar 25, 2020

Just thought about it, should this go in the changelogs?

@obilodeau
Copy link
Collaborator

Just thought about it, should this go in the changelogs?

I'm doing changelog updates after I merge in a separate push straight into master. This reduces the amount of conflict handling that we have to do.

It's not a problem if you provide it but it's not a problem if you don't. I've been using that process with a lot of success over at asciidoctor-reveal.js.

@obilodeau obilodeau merged commit a7452b4 into master Mar 25, 2020
@obilodeau obilodeau deleted the tls1.2 branch March 25, 2020 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PyOpenSSL uses TLS 1.0 to connect to the server
3 participants