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

Please implement VncAuth authentication #1

Closed
julian-seward1 opened this issue Aug 19, 2016 · 5 comments
Closed

Please implement VncAuth authentication #1

julian-seward1 opened this issue Aug 19, 2016 · 5 comments

Comments

@julian-seward1
Copy link

Connecting tigervnc's viewer to the server I want to connect to produces this
CConnection: Using RFB protocol version 3.8
CConnection: Choosing security type VncAuth(2)

Is "VncAuth(2)" different from "VncAuth" ? I have no idea. But anyway, that's
what the server appears to request.

@whitequark
Copy link
Owner

Unfortunately I can't do this because the only Rust implementation of DES is currently broken because of crossbeam-rs/crossbeam#75.

@whitequark
Copy link
Owner

@julian-seward1 OK, I've split out the binaries from the vnc crate, implemented the plumbing for authentication, and inlined the DES code from the des-rs crate so that it doesn't pull in broken crossbeam. Then I've discovered that something in the challenge-response handshake doesn't work correctly, because Xvnc refuses to let me in.

I've spent several hours digging through libvnc and des-rs sources and I have no idea what's wrong with it. I am sorry but by this point I will not spend any more of my time figuring out a completely braindead authentication scheme using a broken algorithm. If you have any idea how to fix it, the des branch has code that's supposed to work according to the RFB protocol description.

@whitequark
Copy link
Owner

@julian-seward1 So I've randomly revisited this and, amusingly enough, I am far from the only one having this problem: http://www.catonmat.net/blog/curious-case-of-des-algorithm/. To quote:

Turns out that the VNC authentication reverses the order of bits in every byte of the password.

I am astounded by the depth of depravity, but I'll implement it now for you.

@whitequark
Copy link
Owner

@julian-seward1 That works! Let me know if you would like any minimal examples to go with your use case, or anything else.

@whitequark
Copy link
Owner

Also published 0.4.0 on crates.io, with the client and proxy split off.

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

No branches or pull requests

2 participants