Apple’s in-app purchasing process circumvented by Russian hacker
9to5mac.com
9to5mac.com
But I guess in order to get something for free, people are willing to go great lengths in compromizing their security. Remember: By installing that guys SSL root certificate, you basically allow them to MITM not just the App store in-app purchasing (and by extension likely sniff your app store password) but also any other SSL protected site like, say, your webmail provider.
If you are using IAP in your app and want to keep this hack from working you should be validating receipts. It isn't hard to do, check out https://github.com/carsonmcdonald/iap-validator for an example.
It wasn't clear from the article if the method could bypass that. It would have to provide valid transaction ids to the app developer's server. That seems a little too sophisticated or impossible, so you're probably right.
I guess we should really just be surprised this wasn't done sooner.
Even if this method does manage to bypass Apple's validation, then it is Apple's problem and they will fix it quickly. But it is much more likely that developers just haven't bothered to validate receipts.
It's a tradeoff, really, that most IAP implementors consider:
Cost of support and loss of goodwill when legitimate customers run into issues vs. loss of revenue from pirates (heretofore only jailbroken phone users) who likely wouldn't have purchased anyway.
It makes fiscal sense for big players with big IAP scale like Zynga to strictly validate. Little players may find it is less critical to the bottom line to be strict about it.
If the value of the status key is 0, this is a valid receipt. If the value is anything other than 0, this receipt is invalid.
http://developer.apple.com/library/ios/#documentation/Networ...
Also that page has an invalid ssl cert :)
I get maybe 20 Game Center invites from 8 year old kids on a daily basis... The reason is I faked my score on the popular game Jetpack Joyride (I'm #1 out of 16 million players), and also beat Minesweeper's hard map in a few milliseconds (second guy is I think over a minute)...
I did it just for fun and experiment, but apparently there are kids who really take Game Center seriously and I stopped doing it, not wanting to hurt their feelings. The instructions are here: http://corte.si/posts/code/mitmproxy/tute-gamecenter/index.h... , but please don't go crazy, and don't submit ridiculous scores like I did. You may get your account banned (which is not a great thing, if you're a developer).
It did cross my mind whilst watching the traffic if you could spoof in app purchases but never took it any further.
>despite warnings from the developer himself to please “not pirate AppStore apps”, he continues to assist users of the hack that report it not working with certain apps.
But they're doing the exact same thing by saying: Don't do this...but if you want to do this here's all the relevant information and if you have trouble the dev is responsive to support requests. They even note that he accepts donations on his site.
I don't know the site but I wonder if they'd say the same if it was for downloading music or movies and not apps.
Note that i'm NOT a tenant of the american strong copyright.
I mean, companies generally prefer you pirate their products than their competitors. But if we're going to be absolutely critical, the company can claim "If you aren't going to pay us, you have no right to use our product. You used our product without paying us."
Sure. But can we all agree developers are free to choose how they license their work?
If I steal a snickers bar from a shelf, the store owner has one less snickers bar regardless of whether I might have paid for it were I not able to steal it.
But copying doesn't deprive the owner of their property at all. It simply creates a new copy of it. If I copy an mp3, the record label and artist aren't deprived of anything.
And, thus, the law makes a distinction.
However, the copyright owner is being deprived of their exclusive right to the content. They have the right to control who uses the content and for what (exclusive of fair use).
But no-one's arguing that copying isn't wrong or a civil and possibly even criminal act. I'm explaining the distinction between infringement and theft, as it's far more relevant than the ultimately unknowable "whether or not the unjustly enriched party may have bought a license".
Was the point I was disagreeing with. (Especially as we're being pedantic about the legal issues).
Copying a single song has punishments up to $150,000 with possible federal jailtime at that?!
One hell of a distinction.
You know. Like how I copyright infringed this car the other day.
My app will call on our server to verify receipt and I was getting bogus receipts that actually caused that part of the code to crash.
Apple's receipts are proper json objects and what I was getting was this string "com.urus.iap.30297356." The last part keeps changing, so I am guessing the developer actually tracks usage.
So the moral is to always verify your receipts and don't deliver content unless the receipt is valid.
But most developers won't have resources to do this and creating a general service for them would be too much custom work. I think SDK platforms should have this capability built in. Pay $10/mo and we'll verify your receipt and return a file based on the IAP product id.
Obviously the fake DNS server intercepts the iphone<->apple's appstore server connections, to deliver a fake receipt. But then what? I would imagine real receipts should be signed with an apple private key. Does iOS also allow user-installed custom CAs to partake in this receipt signature validation? Could this be fixed by "pinning" receipt signature validation to the apple key?
Calls to the developer's server could also be intercepted, if you know which URL endpoints the app uses to "call home", and then they could probably be faked on a per-app basis, if you can wiretap a legit purchase to replicate any asset downloads and handshakes, though.
Here is Apple's docs on how to verify a receipt http://developer.apple.com/library/ios/#documentation/Networ...
A double check to be sure nothing is amiss I guess. I do find it strange that they can't guarantee this callback is not trigged by a response from a HTTPS source. Actually maybe they are and this fake cert is what is allowing it so they added this two phase check just in case. But this ability to verify is also kept around if you store these receipts on your server. Before you write them to your DB you can check with Apple to make sure they are legit.
Another curious thing in the video demo is the alert dialog popup box that is triggered during the fake purchase, the one with the "Like" button and "Cancel" in Russian. Perhaps the storekit receipt transmission protocol allows for injecting actions on the device such as opening alert boxes, in addition to just posting a signed JSON receipt?
The check HAS to be done off the phone for the hack to not be global and ever available.
(also, if the ipa contains all data required for the IAP to work, a jailbroken device stands no chance -- any server checks could simply be NOP'ed out)
I had downloaded the (I believe) Boingo iOS app, which works by performing an in-app purchase for the amount of time you want to use their wireless network in the airport. I followed the directions exactly as specified, but instead of getting a "Purchase Completed" message I got a "declined" message. Despite not having paid for the wireless network time after that I was still able to connect and use the Internet without problem.
It may be that because un-authorized users are sometimes given walled garden DNS settings, it was causing a bit of confusion within the in-app purchasing system that results in free wifi for me.
(My alternative explanation is that I hadn't updated the expiration date on my credit card, so the purchase was declined but Boingo's app didn't differentiate between success and error from the App Store's system so I got the wifi anyway. I think this explanation is still the likely candidate.)
In any case, I told Boingo about the bug when I found it and after convincing them that it was their job to fix it and not mine. Since this was a few years ago I hope they've fixed the problem.
Needless to say I don't like this (IMHO companies should be obliged to pay for wrongly accusing something of copyright infringement [the same for invalidated patents])
The fix for developers is to have your server check the receipt of the transaction with Apple. If Apple doesn't recognize the receipt, don't save the transaction.
Don't have the client do it, because client code can be easily hacked. Someone could intercept the app's communication with your server but it's not likely to be in a common format, so automated hacks won't work. They'd have to crack your app on a case-by-case basis.
> The method is not allowing users to install content from 100 percent of apps, as some users of the method report it failing for certain in-app purchases in specific regions.
1 release new api to validate inapp purchases
2 nobody uses it
3 hire Russian hacker to show how to exploit old api. Everyone fears Russian hackers.
4 ???
5 profit