-
Notifications
You must be signed in to change notification settings - Fork 65
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
iOS 9 Incompatibility #28
Comments
I made some progress. Updated pyOpenSSL to employ perfect forward secrecy. The device will now handshake properly, but I have a new problem. The device factory closes right after it starts without any debug information - no exceptions, etc. Any idea how I can get more information about what is going on?
|
Sorry for the late reply, I'm happy you got a step further. It's been a while since I last touched the proxy code, but I can imaging Apple's servers don't allow SSL v3 connections, so the connection to their server fails. pushproxy might use SSLv3 (not exactly sure what the line does, would have to look into that later), see intercept.py:91. For debugging, you might add a log statement/debugger in interceypt.py:79 - there's a reason parameter that might help. If that doesn't help, you could look at the pushproxy - Apple server TLS handshake using Wireshark and see what happens there. |
Thanks for the input! Hmm.. I tried changing the method to TLSv1_2_METHOD but that did not work on my other devices (wasn't able to test the iOS9 one since it didn't even work on the older iOS versions) - it produced the same instant-disconnect. Adding debugging printout to InterceptClientFactory.clientConnectionFailed had no effect - it appears it is never called. However I also added
Unfortunately Wireshark was not very revealing - I just see a cert from Entrust being transmitted from the Apple push server back to the push proxy server, but otherwise I don't know how to read or interpret the handshake. I'm a bit leery of posting it here since it contains my IP. |
Hi! Any new information related to this? I have the same problem with iOS9, disconnecting immediately after the handshake with a device and connecting to the push server. The setup works fine with iOS8. Edit: I added logging to def connectionLost and it seems that the connection is not closed cleanly due to a handshake failure: I changed SSLv23_METHOD to SSLv2_METHOD but that resulted in an error, maybe I'll try other constants as well. I don't know if I'll be able to get anything out of the handshake either but maybe I still need to check that with Wireshark. |
Hi, I'm pretty sure this is an issue with either openssl being too old or being wrongly configured, so the Apple Push Servers reject the TLS connection due to an outdated cipher or TLS version. I tried to connect using two different openssl versions, the first one is the default installed on OS X 10.11, the other one is one I had lying around (probably outdated as well).
So the openssl version included with OS X 10.11 can't connect to Apple's servers (at least with default settings), but a newer version can. You might try a newer openssl version, I wouldn't be surprised if 0.9.8zh doesn't support ECDHE or ECDSA ciphers although Apple requires one. |
Thank for the reply! I am using Kali with openssl 1.01k and the connection to the Apple's server works the same way as in your example with 1.0.2e. I tried changing the script to use SSL.TLSv1_METHOD as the "openssl s_client -connect 17.172.232.212:5223" started session seems to use that but the only difference was that
was changed to
In apsd logs the failure can be seen as failed certificate chain validation:
Wireshark captures are the next step. |
@Sasiaani you probably need to change CN from courier.pus.huuhaa.com to something like 22-courier.push.apple.com. |
Hi, I am unable to successfully get apsd to accept the proxy certificates. I tried adding com.apple.apsd to SSLKillSwitch2, but iOS is still rejecting the certificates for the push proxy. These same certificates and setup work great on iOS 7 and 8. iOS 9 is doing something else, presumably with App Transport Security (ATS). I did already verify that the generated certs are 2048 bit and are TLS 1.2, which is in compliance with ATS. I'm not sure about the 'Perfect forward secrecy cipher suites' requirement of ATS. Here is some log data:
and then when it tries to connect to push server:
When the device attempts connection, the push proxy server complains with an exception containing
ssl handshake failure SSL3_READ_BYTES
The text was updated successfully, but these errors were encountered: