73 points · by ontoillogical · 14y ago · 51 comments
[Some colleagues and ]I have been doing some research on Letterpress for the past couple weeks (expect a HN story about us later this week… I hope). We independently discovered this hack last weekend. Here's some information:
- the client is trusted; the opponent's client does not validate a played word
- Game Center is a naïve carrier for turn-based games; no validation is done on the server side
- Game Center is naïve by design; this is the beauty (and one of the drawbacks of GC—another major drawback is that your client only works with GC, which means you can't easily port to other platforms, and if you do port, you can't play cross-platform games because non-iOS devices can't use GC). The real beauty here is that Loren/Atebits doesn't need to run any server infrastructure. Apple does it for him. This is a huge benefit to games like this.
- We contacted Loren; he was really cool about it, and doesn't seem to care that Letterpress is cheatable in this way. I'm with him on this. It doesn't matter.
- There's no leaderboard, nor even a long-term score in Letterpress. This cheat doesn't matter.
- As far as we could figure, there's no way to fully validate both clients without 1) adding a server component, or 2) losing the ability to port Letterpress games between devices (from iPhone to iPad, for example); I'd love to hear ideas about how this could be possible if you think we're mistaken
- The dictionary files live in the application's `o/` directory, as a series of text files, named by the word's first two letters. e.g. "imbecile" would be in `o/im.txt`
- The app will re-read dictionary files on launch (or maybe at word play); either way, the dictionary can be changed during a game; it's even possible to start a game with a person and immediately play the winning 25-letter word, before the opponent even gets a game-state notification from Game Center
- There are 271377 words in the Letterpess dictionary.
- The longest words in the Letterpress dictionary 21 letters long. There are three of them: `counterdemonstrations`, `hyperaggressivenesses`, and `microminiaturizations`
- There are 124 two-letter words
We'll try to outline some of the other Game Center research in the article we publish. We welcome future upvotes. (-:
S
[edit: auto-paragraph fail, tyop]
(The following probably isn't what you had in mind by "fully validate", but I think it puts it considerably closer to the challenge of defeating binary validation. Assuming everything has to happen in the app, infallible validation is impossible anyway.)
You would get pretty far by introducing internal data validation routines and making them compare the output of these routines based on challenges they issue to one another. That would require any attackers to introduce new code paths to defeat it. I've no idea if this can be negotiated practically over GC, but I can only assume so.
Also, I take issue with this:
There's no leaderboard, nor even a long-term score in Letterpress. This cheat doesn't matter.
I don't really care about leaderboards. I do care about the experience I have when I'm actually playing the game. I know this was probably meant in the sense that the incentive is lacking, but I disagree. Some people enjoy ruining other people's fun. The worst experience I've had was hack-enabled griefers in a cooperative game.
If that is the worst experience you have ever had, then you lead quite a charmed life.
I look forward to seeing your article.
I haven't tested it too much, but I believe the dictionary is read at each turn not at start.
I think you're right about the constraints for client validation, but it's probably possible to raise the bar for cheating a bit without leaving the GameCenter architecture.
Not that I'm an advocate of security through obscurity, but it is after all just a game.
I hope my boss doesn't find this. He's already a prolific words with friends cheater.
There is. In case you were curious, it goes a lot like this: It doesn't work.
It doesn't take a genius to crack a game. The most important quality one needs is curiosity. I've personally lost count of the number of games I've messed with, and that's not a boast. Anyone can do it if they try.
I've never done it to cheat at a competitive game, however I have had a number of competitive and even cooperative games ruined by people cheating in such a manner. If it can happen it probably will, especially if the game is popular. Developers of commercial games should be obligated to take this kind of thing seriously (I am looking at you, Team Meat.)
Sure it does, enough, anyways. I'd be willing to be the majority of players don't cheat and have no interest in cheating.
The remainder that have an interest can be futher subdivided into "no idea how, no idea how to begin", "no idea how, but curious enough to look", and with the addition of the author's post, "no idea how, but a google search away with step by step instructions".
It's a cool hack, don't get me wrong, but now the developer is going to have to rewrite their system to mitigate this, and in the meantime, there are going to be a bit more dicks in the world.
But at least there was a nifty wrapper released- I just wish it wasn't for black hat purposes ;)
but now the developer is going to have to rewrite their system to mitigate this
This hack was literally waiting there for anyone who cared to look. Please don't tell me you've forgotten this: http://img820.imageshack.us/img820/1641/itsfinetrustme.png
Of course different games have different considerations in this regard. Consider Draw Something, where the game itself provides the ultimate built-in cheat: draw the word the other person is supposed to guess!
Significantly raises the bar for casual cheating.
Edit: Oh, and if it uses game center, then I think you won't be able to match any opponents since you're no longer running on the official app ID.
As a business question, is it worth it to think about cheating in advance and try to prevent it?
Just going by the example of Letterpress, it seems the answer is a resounding NO.
what happens when a letterpress update updates the dictionary but you are playing against someone with an older version ?
Draw Something uses a key value storage to store all game state including user profiles, drawing and gamelists. You can edit all games and users, and give yourself as many coins as you want
[0] using letterpress's own dictionary file would be better as it'd avoid words which are in one but not in the other.
Libimobiledevice does a lot of things, and as I mentioned in the post I've only implemented a subset so far. I'd like to make it more feature-complete soon.
You should come help out in https://github.com/stateio/imobiledevice.
I find it highly ironic that people post stories about hacking this thing or the other all the time, most of which do not even resemble the original definition of the word in any way and yet a story about an actual hack has this comment on it.
Hacking is exploiting code in a way that it was not intended to be used.
The OCR part on top of this would be easy, it already exists for Soduku solvers.