lansearch: Add ability to discover devices using encrypted communications #6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I am exploiting weak PPPP encryption here to send all 157,092 possible ciphertexts of the LAN search packet. This allows discovering not only devices using plaintext communications but those using “encryption” as well. A detailed explainer for the key enumeration will be published under https://palant.info/2026/01/05/analysis-of-pppp-encryption/ on January 5th.
I’ve tested this with 40 fake devices: using unencrypted communication, all real-life keys I could quickly find and a number of randomly generated keys. The device IDs were randomly generated. The script consistently detected all 40 devices with between zero and two decryption ambiguities (same device listed with typically two or three possible IDs). This takes approximately 45 seconds for me.
Examples of decryption ambiguities: XBFMG-391344-JQSBU was also listed as XBFMG-391308-JCHBU; WCUHU-188234-BMVVM was also listed as WCUHUS-157514-BMVVM, WCUHUX-137290-BMVVM; XUAAP-705978-XJQMM was also listed as XUAXP-705978-XJTMM; KSCS-900857-TVSUR was also listed as KQCS-900857-TASUR, KDCS-900857-TLSUR.
I tried to see whether tracking which specific request (meaning which specific keys) triggered a response would resolve the ambiguities. As expected, this is not the case: the keys resulting in ambiguous decryptions of the punch packet also encrypt the LAN search packet in the same way.