301 points · by robbiet480 · 13y ago · 221 comments
Doing it this way means that Apple can't just block them by IP address, it avoids them having to distribute their "secret sauce" (understanding the iMessage protocol is clearly very valuable), and it potentially allows them to use actual Apple code on their servers (in case they haven't spent the time to fully break the fairplay obfuscation that Apple is using for some of their keys).
Here's what I'm seeing: every time I send it a message, I get a packet from Apple, and then immediately the app sends a packet of almost exactly the same size to 222.77.191.206 (which is listed in this application's APK as "ServerIp"). It then gets back two packets from the Chinese server, the first of which I'm presuming is the decoded result and the second packet being a response to send Apple (as immediately a packet is sent back to Apple with about the same size).
Additionally, if you read the reviews of this application, the author is making some very weird responses to people with login issues: he's asking for their Apple ID, as apparently that's enough for him to debug their issue. That shouldn't be possible if the application is just directly talking to Apple the entire time.
[edit: The more I stare at this, the more confident I am in this analysis; specifically, the packets that are "about" and "almost exactly" the same size are very deterministic: the packets to/from Apple are precisely 7 bytes larger than the corresponding packets to/from the Chinese server.]
[edit: It also occurred to me to verify the other direction: in fact, if you go to send a message, first the client sends something to the developer's server, which then returns a packet which, along with again the exactly 7 extra bytes, is sent to Apple's server.]
If you are American, you don't have to fear from Chinese espionage, and US agencies already have your data. If you are European, it's more or less the same. If you are from China, well, at least you can prove that you are not doing anything behind the government back ;)
Neither Apple nor the NSA will, for example, immediately rack up a string of fraudulent charges on every credit card number that it sees come through its system. Some random guy in China? I'd say there's a pretty high chance that's exactly the reason this app is in the app store.
I don't know who's running this server in China. But unless it's the NSA, you're much worse off using this app than native iMessage, because now in addition to NSA seeing everything, so does this guy--who has no reputation at risk. Adding more eavesdroppers makes communications additively less secure.
How exactly do I have nothing to fear from the Chinese? At least the NSA is unlikely to have any real interest in communications between Americans in America because it's outside their mission, which is not true for Chinese or Russian intelligence.
Not. This. Again.
Because one person can read your messages, it doesn't mean that the whole world should be able to. One happening doesn't mean the other is okay.
Citation needed. There are numerous stories (unconfirmed of course, but that's the way these things always are) of Chinese hackers breaking into companies and stealing trade secrets. They aren't just after super spies, you know.
And you don't work in an industry the Chinese would be interested in? Good for you. But do you know anyone that is? This hack might quite possibly allow them to send messages as you to whoever they want.
"The NSA has my information so hey, screw it" isn't really an appropriate reaction.
Seriously? You're going to complain about his English?
https://github.com/huluwateam/icloud
[edit: maybe this is more simple to decrypt https://github.com/huluwateam/icloud/blob/master/DataSyncSDK...]
Not saying that's a good thing, just that it's a likely thing.
ED: Their obfuscation isn't actually that severe once you get used to it.
I had hoped that I could decompile it, get the special sauce, and make a client for Qt-based OSes and also Windows Phone. Looks like I won't make any progress today
I'll try BBM too once its on Android. Trying to get it off my Z10 has proven just as difficult
1) They are using a workaround like a vm running osx where a program add the requested account on Message.app and then send back the I/O.
2) Second solution they got from an insider the protocol description and decryption.
Additionally, I know that recent efforts in the hackintosh community had problems with Message.app because the latest protocols incorporate being able to access the serial number of your machine (or something along those lines). Apple goes through some extensive hoops verifying that access to OS X -only and iOS-only services really does come from their devices.
Our head of IT switched from iPhone and got a new Android phone. Suddenly he found that none of this Apple-using friends were messaging him anymore.
Actually they were, but Apple re-routed their SMSes through iMessage to a dead Apple-account. Without telling anyone about it.
Until he discovered what happened (due to a very angry and ignored-feeling Apple-using wife), he just assumed SMS was broken on Android.
iMessage really shows Apple at its core: So utterly self-centered that it's unable to comprehend that it even needs a interoperability story with the rest of the world.
On top of that I've had friends switch away from iPhone to Android; iOS switched to using SMS not but a day later (and I know at least some of them didn't turn it off manually because their iPhone was broken).
If you know it needs to be done. If you still have the device.
According to our head of IT, he said if you didn't (as most people don't) it gets a whole lot worse.
This exact thing happened to me. I switched back to Android and after a week of not receiving messages from my friends and family it took me hours and quite a few calls (sadly) to both AT&T and Apple before it was figured out.
In fact at first Apple had denied that anything should be wrong, thus all the wasted time figuring this out. Left a really poor taste in my mouth from the whole experience.
Worked just fine.
I write/read my messages mostly from my mac (usually where I'm most of the day -.-) so I'm still using iMessage to chat with the 99% of my friends which owns an iphone/ipad.
Indeed I see what you mean and I agree with you.
I had to call back and forth from Apple/AT&T over the period of two days before they figured out what was happening and disabled it. Missed tons of messages.
I wish there could be some commonly agreed standard that would include all of the smartphone OS and be implemented similarly.
[1] except when I forget to check 3g before sending a photo and get charged for an MMS :(
> In some countries that's 10x cheaper than SMS or MMS.
As a Canadian that's the real shocker to me, it's basically the opposite up here.
iMessage also uses your phone number, but can use an email address as well.
This is truly impressive!
Are you referring to the seemingly-encrypted network connection over port 5332 to a server in China at IP address 222.77.191.206 that has traffic that precisely correlates to me sending and receiving messages using the application? [edit: Which happens to be the value of the resource ServerId in the APK?]
It will get banned on Apple's end so quickly, but not before it's used to send mountains of spam.
Only connects to Apple itself, And
http://alog.umeng.com/app_logs http://alog.umeng.co/app_logs http://oc.umeng.com/check_config_update http://oc.umeng.co/check_config_update
Which is 'apparently' a chinese analytics provider.
So I wasn't sure if things had changed in later versions of the app.
(eg. iCloud for PC)
Beyond that all they need to do is include some form of digital signing in the login process which he can't duplicate and jobs a good un.
Alternatively they may say that they don't care and leave it alone as it strengthens iMessage as a platform.
But my guess is that this won't end well. Isn't it trademarks that you have to defend or you lose them? If that's the case then Apple at the very least need to have him change the name and so on.
Now, should the conclusion be "we should stop communicating electronically"? That would be a severe restriction to free speech and thus advancement of our species. So, no.
Maybe the right direction is to migrate the discussion towards encrypted and distributed forums. RetroShare offers such a feature (amongst others): http://retroshare.sourceforge.net/
I saw, to my great disappointment, that the program was not Apple's.
Any phone carrier call center employee can check your inbox, supposedly that's an audited procedure but having worked in a call center I would tell you that I'd believe that nobody's watching anything. Just like email, SMS is a poor protocol/medium that has been contorted to doing way more than anyone ever intended originally.
But there is definitely a need for a commodity, cross-platform secure messaging protocol that can be implemented by anyone. It hardly seems like there's anyone incentivized to do that though -- why would Apple, for example, want to ferry traffic to/from non Apple phones. And why would they want to step aside and let someone else replace their seamless, secure-ish messaging experience with something else? None of the other messaging apps can achieve the level of integration with the rest of the phone that iMessage can.
The mere facts that iMessage is a) so good (integrated so well into the OS by way of unfair advantage) and b) closed, are probably sufficient to make sure that there won't ever be a common, secure messaging platform. It couldn't penetrate far enough into the iOS user base even if every Android user installed it.
We even have standard messaging protocols (XMPP), so it is not a technical hurdle. Merely there is no business opportunity to commoditize messaging, so it hasn't happened.
I still don't recommend allowing your conversation to be MITM'd, but the assertions that China = steal your password and charge your CC are a bit crazy. Propaganda works I see!
but the assertions that China = steal your password and charge your CC are a bit crazy.
The assertion that sending the password for an account tied to your credit card to a completely unknown recipient is a bad idea... is not crazy in the least. And has nothing to do with it being in China.
With the US' draconian DMCA law in place, it also now illegal to build any devices that Apple hasn't licensed to use Airplay on your Apple TV.
If so, if they or someone could put up the source or even a protocol spec, that would be amazing.
I posted the APKTool output on Github for anyone that wants a quick look - https://github.com/mdp/iMessageChatDecompile
Put it this way, just like AirPlay and AirDrop, it keeps the open-source community on the backfoot, always looking to "keep up with the Joneses" when in fact we should let these proprietary protocols wither and die.
The public perception shouldn't be that Apple lead and others follow, it should be that Apple have deliberately isolated themselves from everybody else.
* By backdoor, I mean the protocol isn't actually end to end secure in the way Apple claims(i.e. safe from NSLs) and Apple does actually have access to messages. Not that the protocol looks secure and they picked backdoored primitives or some secrete key escrow scheme, though they may have done the latee at least in other cases[0]
[0]http://www.nosuchcon.org/talks/D1_02_Alex_Ninjas_and_Harry_P...
Seriously? Not to mention all the data that can be mined from your associated messages. And for argument's sake, since, again the passwords are in cleartext, let's just say that a small percentage of users also use the same email and password for their Facebook or their Gmail (or whatever else email they have) -- let's just brute force some bank accounts, send a forgot password request, then scour their facebook for the security question. Nightmare scenario, but considering you're passing some random guy in china all this information, not entirely infeasible.
Assuming Apple doesn't kill it of course... There are some good reasons why Apple shouldn't kill it (network effect work both ways) but who knows what they will do.
1) It appears that the iMessage responses received from Apple's servers are forwarded as-is to a remote server for decoding and decryption. Is this correct? If so, why isn't this process performed in the application itself?
2) Now that you've clearly reverse-engineered the iMessage protocol, will you be publishing it so that others can benefit from interoperability? If not, why not?
Why did you use Apple's graphics instead of your own? It will make it easier for Apple to have your app taken down.
Classifying and stereotyping (even in a passive-agressive sense) is a relic of the past you need to get over.
Good work on reverse engineering the protocol though.
(If there already is one I'd love to be pointed at it, I've done some searching previously trying to get a nice solution for getting scripts at home communicating with me - I eventually settled on using push notifications with Prowl http://www.prowlapp.com/)
Use it with a demo account.
What they can do is to shut off the backend because they probably don't have rights to use it anyway.
Also, it's sure that they are intentionally copying Apple's copyrighted material.
I just tried it out myself, and my boss who uses an iPhone is in total shock.
(adjusts tin-foil lined colander on head)