-
Notifications
You must be signed in to change notification settings - Fork 32
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
Capturing QUIC Keys #41
Comments
For more context, I am trying to capture packets from the android Messages app to analyze RCS packets, which from what I can tell using a pixel 9 device, use either UDP or QUIC. |
Hi @SinghSek thank you for your detailed question and for providing additional context—it’s much appreciated :-) QUIC and TLS KeysQUIC derives its encryption keys from the secrets negotiated during the TLS 1.3 handshake. These derived keys are used to secure QUIC traffic (cf. Using Transport Layer Security (TLS) to Secure QUIC). The good news is that Wireshark doesn’t require the derived QUIC keys directly—it can compute them using the TLS secrets (e.g., keys.log) captured by friTap. See Wireshark source file. However, there are some considerations:
In recent versions of friTap, including 1.2.8.5, we’ve introduced some minor improvements that might help with your use case. There was also a bug in previous versions that could have affected key extraction in certain scenarios. I recommend updating to the latest version and trying again. You can update friTap using: pip install friTap --upgrade RCS Packets and friTapSince you’re analyzing RCS packets from the Android Messages app on a Pixel 9 device:
All the best Daniel |
Thank you for your breakdown, I am now encountering an issue where the keys do not get logged at all, FriTap runs perfectly fine, but after the process is finished, the keys.log file is empty. Any idea how I might overcome this? |
Hi @SinghSek, I'm a little confused— in your initial post, you mentioned that you were able to log some TLS keys but couldn't decrypt the traffic. Am I mistaken, or is this a new issue where no keys are being logged at all? Also, are you still testing with the same app? Which Android version are you currently running? Which version of friTap you are using? To better assist you, we’ll need more context. Could you provide details about how you're running friTap (e.g., command used, output logs, version number) so we can investigate further? Looking forward to your response :-) All the best Daniel |
Sorry for the confusion, I was initially testing with both a pixel 9 running android 14 and a samsung s21 running android 11. Previously the keys were logged but traffic was not decrypted. Now I am only using the S21 with the same set up on the same app, and keys are not being logged. I verified decryption works on a pixel 5 as after every UDP and QUIC packet, http packets with the option to decrypt are present (choosing to decrypt QUIC packets show a random string of characters, but I think that is a separate issue for another time). I am running this command: fritap -m -p log.pcap --full_capture -k keys.log 27944 Here is the debug output: [] capturing whole traffic of target app [] Ctrl+C detected. Cleaning up... Thx for using friTap Thank you for your continued help so far, for reference, I am trying to find the plaintext content of an RCS packet to verify the RCS standard is being used. |
Hey @SinghSek , thx for the detailed outpout :-) If its still not working can you connect to the target app with frida and provide us the output of the following command: Process.enumerateModules().forEach( (element) => { if(JSON.stringify(Process.getModuleByName(element.name).enumerateExports().filter(exports => exports.name.toLowerCase().includes("ssl_ctx_new"))).length > 2){ console.log(element.name + " : \n" + JSON.
stringify(Process.getModuleByName(element.name).enumerateExports().filter(exports => exports.name.toLowerCase().includes("ssl_ctx_new"))));} }); All the best Daniel |
Hey Daniel, thanks so much for the response, as I am using the commands in the terminal, how would I go about connecting to the android messages app via frida, would I just grab the PID? and how would I run the command, you have wrote, would that just be in a python file? Sorry, I'm still a little new to this type of analysis, and your help is really appreciated! Also, I have just verified that, even on the newest version of FriTap, the S21 running android 11 still results in an empty keys.log file when running the fritap command. I've been able to collect the keys off of a pixel 5 running Android 11 however. |
Hello! I posted a similar question on my previous issue, but have not been able to figure it out and was advised to make a separate post. I have successfully captured TLS keys using FriTap, but my ultimate goal is to decrypt QUIC packets. In wireshark, under QUIC Protocols, I noticed one of the fields is QUIC Ports, and was wondering if there is a way to capture what ports are used when running the FriTap Command.
Additionally, I've read that QUIC may have it's own keys on top of TLS, and would like to ask if anyone has had luck decrypting QUIC (maybe capturing the QUIC Keys) using this tool.
Any advice is greatly appreciated!
The text was updated successfully, but these errors were encountered: