-
How does one decrypt the TLS traffic sent between GSConnect and KDEConnect in Wireshark? Per this page, I've tried adding the GSConnect Am I missing some step? Or does this have to do with the ECDHE usage here (like I suspect), which makes decryption impossible with the PEM file alone? If the latter, would it be possible for GSConnect to spit out the needed secrets to decrypt the session traffic (just like it shows the SHA fingerprints under Encryption Info)? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 18 replies
-
Based on the link, it doesn't seem like the traffic can be decrypted by WireShark. If you're just looking to view the incoming JSON packets, you can just enable debugging: dconf write /org/gnome/shell/extensions/gsconnect/debug true This will dump a lot of private data into the log though, so you'll want to be sure to turn it off when you're done. Other than that, you may have to go digging around in the source to modify the TLS connection. |
Beta Was this translation helpful? Give feedback.
-
Unlikely, but setting the gnome-shell-extension-gsconnect/src/service/daemon.js Lines 9 to 11 in 2039513 Pop a line right below that in your imports.gi.GLib.setenv('SSLKEYLOGFILE', '/tmp/gsconnect-secrets.txt', true); And you should be in business. GSConnect will even helpfully restart the daemon process if you edit its source while it's already running. Then run a capture with Wireshark. (Seems to work better if you capture the initial handshake between the devices, so the handshake key can be matched up to the right packets. So, maybe disconnect and reconnect the device, or disable and reenable GSConnect.) After it's done capturing, right-click any TLS packet and choose Protocol Preferences > Transport Layer Security > Open Transport Layer Security preferences... That gets you a configuration dialog, including a "(Pre)-Master-Secret log filename" field that you can point at Once that's done, you should have a "Decrypted TLS" tab on the lower right, next to "Frame". (Edit: Though, really the "Decrypted TLS" (hexdump+partitioned ASCII) view is far less useful than the packet context menu's Follow > TLS Stream option, which opens a dialog where you can view the entire reassembled back-and-forth between the endpoints in either ASCII or UTF-8.) |
Beta Was this translation helpful? Give feedback.
-
It's not the browsers that support that, it's the libraries. So it works with GSConnect (or anything else) as well. |
Beta Was this translation helpful? Give feedback.
-
A note for anyone who wants to view the SSH/SFTP setup traffic that is generated when you attempt to Mount, for instance -- SSH uses TCP for transport and by default, Wireshark won't interpret the GSConnect TCP traffic as SSH traffic -- likely because the GSConnect ports are non-standard (as opposed to the popular SSH port 22). So, you'll have to tell Wireshark manually -- Right-Click on any TCP packet you suspect is really carrying SSH. Select In the new dialog, there should be a single row, with (No need to click Save since that may make your change persistent for this port, which would be pointless since the port is dynamically assigned, it doesn't always serve SSH.) Wireshark should now interpret the SSH traffic. |
Beta Was this translation helpful? Give feedback.
Unlikely, but setting the
SSLKEYLOGFILE
envvar is child's play, and seems to work. It's the GSConnectdaemon.js
process that would need that value in its environment, and it's already setting TLS-related envvars as part of its setup.gnome-shell-extension-gsconnect/src/service/daemon.js
Lines 9 to 11 in 2039513