top | item 13579353

Russians Engineer a Slot Machine Cheat that Casinos Can't Fix

391 points| arielm | 9 years ago |wired.com | reply

302 comments

order
[+] kartan|9 years ago|reply
I see a lot of complains why this is illegal. It is illegal, as anything that it is illegal, because the law says so.

As, for example, in Nevada:

"NRS 465.075 Use of device for calculating probabilities.

It is unlawful for any person at a licensed gaming establishment to use, or possess with the intent to use, any device to assist:

      1.  In projecting the outcome of the game;

      2.  In keeping track of the cards played;

      3.  In analyzing the probability of the occurrence of an event relating to the game; or

      4.  In analyzing the strategy for playing or betting to be used in the game,
except as permitted by the commission."

http://www.gambling-law-us.com/State-Laws/Nevada/

[+] ainiriand|9 years ago|reply
I would like to know what is morally wrong in defeating a system designed to beat you. Designed to (almost) always win. The Casino is the one that cheats because the odds are not completely random, as they should.
[+] tzs|9 years ago|reply
> The Casino is the one that cheats because the odds are not completely random, as they should.

I get what you mean, but what you said means something different, in a way that leads to an interesting question.

The odds are not supposed to be completely random. The odds are supposed to fixed in most (all?) casino games (and in most non-casino games). It is the outcome that is supposed to be completely random in casino games, distributed according to the fixed odds.

That raises a question. What would a game look like where the odds were random? The odds are determined by the rules, so would the game have to have rules that are changing at random?

But if you are given the distribution of the random numbers that determine the rule changes, you could still work out the players odds for the overall game. So do we have to have the distribution that the random rule changes use be completely random, too? But the distribution used to generate the random number used to pick the distribution for picking random numbers to drive the rule changes...do we need to pick that at random....is it going to be random distributions all the way down? My head is starting to hurt...

[+] digler999|9 years ago|reply
They aren't charging the defendants with a 'moral' crime. I'm not sure what their exact charges are, and they depend on minutae like the article said: "crossing state lines makes it a felony conspiracy to commit fraud". Gaming regulations are written to favor the house. You're correct that we wouldn't expect them to be charged with "tampering with a gaming device" because they never touched it, and they got comparatively light sentences (2 years) compared to Nevada where you can easily get 5-10. Some states may have a new law like "using a computer to manipulate a gaming device" or similar. I think they put that one on the books so that you can't cheat roulette by calculating the trajectory of the ball, or identify unique variances in cards. Regardless, you can expect the laws everywhere to catch up after this incident.

I disagree that the "system is designed to beat you" or that the casino "cheats". The casino is there for entertainment. If you don't use it in moderation it can ruin your life just like any other vice: alcohol, drugs, sex, etc.

If you have $1000-$5000 (or more), you can fly out to Vegas for the weekend, have a really good time (gaming is only part of that), fly home, and you've got a significant chance that you'll either win or break even. You might also lose, and that's the excitement cycle that is gambling. But even if you lose you can also have a good time at a show/nightclub/concert, every kind of themed bar, meet women, etc, so if you discard "winning money" as the primary objective, gambling isn't designed to beat you.

If you go to the casino every day after work, don't be surprised that you will not win anything, or that it might escalate just like any other drug (spending more, not happy when you win, etc).

What shocks me is that these guys have the technical prowess to reverse engineer the game/PRNG, but they didn't have the sense to slow down their pace, or reverse engineer the casino management system to avoid detection (or they didn't think to hide their iphone from the start, they said the first guy was holding it right up to the screen, when $100 spent on a clothing alteration would have allowed him to hide it). If you're going to fly internationally to commit a crime, you should know who you're up against and use adequate countermeasures.

[+] xux|9 years ago|reply
It's not designed to "beat" you. Casinos are entertainment venues, not banks. One of the main selling points of casinos is the thrill you get from potentially winning a lot of money. You pay for the fun in form of the slight loss of edge in the long run odds.

No one goes in a movie theater and complain that it's "beating" you because you come out with a net negative balance

[+] unwind|9 years ago|reply
I guess you're (as a player) supposed to know, understand, and support the fact that the house always wins. It is, after all, not free to build, staff and run a casino, so it would seem obvious that the money to do all that has to come from somewhere? You're simply not supposed to be able to win "too often".

Sure, it would be better if it were truly a game of chance, I guess that's too difficult to deliver (and verify) at this point. Or, perhaps, the casinos prefer it this way of course. :)

[+] DannyB2|9 years ago|reply
There's nothing MORALLY wrong with defeating the system.

But it's LEGALLY wrong. That is what will get you into trouble.

In certain countries, it's not morally wrong to criticize The Dear Leader. But it is legally wrong and could get you beat to a bloody pulp and thrown in prison. Other countries have not yet implemented such policies.

Moral and Legal are different things.

[+] crusso|9 years ago|reply
Casinos make no representations that the odds are "random", and by that I assume that you mean that you have an even chance of winning a given bet.

Casinos are in the business of providing entertainment through games that sometimes allow you to win money.

If you put money into a PacMan machine, you don't get your money back either. You get entertained by playing the game.

If you go to a movie, you pay money that you don't expect to have returned. You pay for entertainment.

[+] k-mcgrady|9 years ago|reply
>> The Casino is the one that cheats because the odds are not completely random, as they should.

Why should they be? It's a form of entertainment not a way to generate income successfully through skill. If the odds weren't stacked against you I think it would get boring quite quickly as the wins wouldn't be as satisfying.

[+] megablast|9 years ago|reply
You agree to it though, right? You don't have to play at the Casino, you know how it works, you walk in and accept those rules when you start playing.

You don't get upset when you go to a whale show and get wet do you? You don't get upset when you go watch rally racing and get some mud on you?

[+] ChuckMcM|9 years ago|reply
More of a terms of service violation. In my experience growing up in Las Vegas they really only arrested folks who used some device to physically cheat. People who worked the odds by card counting or perhaps taking advantage of an out of balance roulette wheel generally were simply banned for life (which technology and facial recognition makes much easier today apparently).

Conspiring with others to break terms of service is of course a crime, and doing so across state lines, is its own sort of nastyness. But you can see from the prison terms (2 years) it wasn't exactly a big threat to these guys.

[+] Shivetya|9 years ago|reply
I would not mind a slot machine based on chance but when the odds are coded in and payouts are refused because of bugs/etc it is not longer a game of chance it becomes something else. At least with cards and dice there is still a lot of chance and the thrill remains.

however defeating a legal system should still hold a penalty unless said defeat exposes an illegal setup

[+] jlg23|9 years ago|reply
>I would like to know what is morally wrong in defeating a system designed to beat you.

You know it is designed to beat you, you accept the terms and conditions by entering a casino. Which makes you, if you think it is OK to cheat then, a criminal by law and unethical by any standards.

[+] rdiddly|9 years ago|reply
Yeah, the article uses terms like cheat, scam, malfeasance, swindle and bilk, like the casino deserves that money. It's not some poor little old lady, it's an organized-crime-ridden bribe factory getting beaten at its own shifty dishonest game.
[+] reddytowns|9 years ago|reply
Because that would lead to a smaller Las Vegas which would hurt the livelihood of the constituents.
[+] tomjen3|9 years ago|reply
I also don't see what is illegal here - isn't it basically counting cards?
[+] CapacitorSet|9 years ago|reply
Saved you a click: the internal state of some slot machines' PRNG can be predicted after observing a few of its outputs.
[+] moftz|9 years ago|reply
At what point does a scheme like this go from just being a way to outsmart the slot machine to felony fraud? I know you are allowed to use those blackjack cheat cards at the tables in Las Vegas but what if I started using a calculator and my own crazy algorithm? Is that fraud? What if I had an ear piece and hidden camera glasses to stream video to some blackjack guru outside in a van? I'm guessing that would be fraud. Is it the fact that he's using an outside source to determine his actions?
[+] upofadown|9 years ago|reply
Here is a section of the Nevada gambling fraud law that hits close to a method that involves button timing:

>7. To manipulate, with the intent to cheat, any component of a gaming device in a manner contrary to the designed and normal operational purpose for the component, including, but not limited to, varying the pull of the handle of a slot machine, with knowledge that the manipulation affects the outcome of the game or with knowledge of any event that affects the outcome of the game.

In general you are not allowed to do anything clever in a casino. It isn't stated as such, but the actual crime is winning consistently. If you walk into a casino certain that you will not be providing the house with their cut then you will almost for sure run up against some law. Extra laws will be generated as required by the governments involved.

[+] objclxt|9 years ago|reply
Slot machines and blackjack are very different.

> I know you are allowed to use those blackjack cheat cards at the tables in Las Vegas but what if I started using a calculator and my own crazy algorithm? Is that fraud?

They're not really "cheat" cards: even with a perfect strategy, blackjack still has a (very small) house edge. That's why casinos have no problem with you using them. And if you brought your own, hand-written, crazy algorithm the casino would probably let you play with it - because chances are it's much worse than the perfect strategy the printed card uses (a lot of blackjack players operate under the principle that the previous player's actions influence the game and adopt some pretty stupid strategies as a result).

However, the casino almost certainly wouldn't let you use a calculator, because they'll think you might be using it to count cards. That's why you can't use a phone at the table. Ditto for this:

> What if I had an ear piece and hidden camera glasses to stream video to some blackjack guru outside in a van?

...but the casino would certainly let someone next to you give you advice or help, because unless that person is counting cards they're still going to have a house edge (and it's pretty easy to tell when someone is counting, because you'll start making plays that would otherwise be in the house's favor).

Note that counting cards in blackjack isn't fraudulent in most cases - it's just one the casino cottons on that you're doing it they'll ask you to leave or stop playing. Outright fraud in blackjack would involve something like having the dealer in on the scheme, or using a marked deck of cards.

[+] contravariant|9 years ago|reply
To make it fraud requires two things. First they need to be breaking some kind of legal agreement, secondly they need to use deception to make it seem like they didn't.

In this case it's debatable to what extent they're deceiving anyone, but more importantly all they're doing is pressing the slot button at the optimal time, which is kind of the point of the game. Now most people wouldn't consider this 'fair', but for a legal argument that is a bit vague, even if it might be enough to say, disqualify someone from a tournament.

[+] clubm8|9 years ago|reply
Not a lawyer, but I think the fact he used a device (iPhone) to aid him is what did him in.

But I'm not sure where the line is either... would writing down results from a roulette wheel in a notebook be cheating? If not, why is recording the results of a slot machine?

[+] linohh|9 years ago|reply
For the german speaking; here's a documentary about a guy who did this in the late 70ies in Germany - without an iPhone, just by developing a feeling for the (back then) mechanical machines.

https://vimeo.com/169617086

Fun fact: §263a StGB (German penal code) was in part created to combat this kind of externally assisted prediction for slot machines. It is now punishable with up to five years in prison, if you just create or distribute the software up to three years.

[+] ptero|9 years ago|reply
Funny (and sad) how something that could be praised as an ingenious trick a hundred years ago is now considered a crime that state spends serious effort to pursue.

Cannot resist to reference an older perspective (from Smoke Bellew):

http://www.online-literature.com/london/smoke-bellew/4/

[+] LordKano|9 years ago|reply
That was a great story. A little long but still great.
[+] technofiend|9 years ago|reply
A quick search of the inestimable comp.risks archives revealed this:

http://catless.ncl.ac.uk/Risks/15/80#subj2

Montreal -- Daniel Corriveau said he hopes that his 'victory over the system will give hope to others.' The computer analyst and his family received more than $620,000 [1C$ = U$0.75], including interest, from the Montreal casino yesterday, weeks after they overcame odds of one in six billion and beat an electronic keno game three times in a row."

The author explains the following key points:

o Corriveau used an "antique 286" computer to analyse 7,000 combinations from the keno game, [which uses an electronic pseudo-random number generator].

o Corriveau noticed that the electronic game was repeating numbers in a predictable pattern.

o Corriveau and several family members bet on what they predicted would be due to come up; they won three times in succession.

I had originally seen an article speculating someone power cycled a keno machine after recording the winning numbers, with the assumption or knowledge that the random number generator reseeded with a 0 on cold boot. I'm not sure if that's just me mis-remembering the details of this case, or another one altogether. If anyone has a link to the second case please let me know.

[+] splonk|9 years ago|reply
> Allison notes that those operatives try to keep their winnings on each machine to less than $1,000, to avoid arousing suspicion.

This is likely to be because they're trying to avoid the automatic W-2G that's generated for slot winnings over $1200. Basically if you're playing anonymously on a slot machine, any payout of $1200 or over on a single spin will generate a human interaction. Unless you're playing at fairly high stakes (say, over $100/spin), this is normally rare enough that hitting several $1200+ results in a short time span would be very suspicious. Keeping every win under $1200 allows a person to play as anonymously as you reasonably can in a casino.

[+] mnarayan01|9 years ago|reply
The "And Casinos Have No Fix" part of the title seems exaggerated; if nothing else, it appears that only a small subset of 5+ year old machines are affected.
[+] fifnir|9 years ago|reply
And casinos can have people arrested over this so that's another fix
[+] kyteland|9 years ago|reply
It absolutely is exaggerated. I left a job at a real money slot manufacturer 3-ish years ago where I was a mathematician and 'the rng guy'. Even then our machines weren't susceptible to this attack. We had a fix. And by 'weren't susceptible' I mean probably weren't but could be, because getting the rng wrong is super easy to do. Don't be shocked if regulators just pull these from the floor. They probably had to go through a lot of different machines from different manufacturers to find this in the first place.
[+] rtkwe|9 years ago|reply
From the description of the attack it seems like the only reason other machines aren't affected is because the Russian group running this hasn't gotten their hands on those machines.
[+] FabHK|9 years ago|reply
Don't know what PRNG they use, but for the Mersenne Twister (MT19937, which was considered state of the art the beginning of this millennium) for example you can deduce the state after 600 or so observations (of 32 bit words), and then predict what it'll deliver after that. See [1] for details and some good background on PRNG, if possibly a bit biased (she's promoting her PCG family).

For gambling purposes, probably makes sense to use cryptographically secure PRNG :-)

[1] http://www.pcg-random.org/predictability.html

[+] droithomme|9 years ago|reply
That is a very interesting article.

I disagree with the characterization of the crews as "cheaters". They didn't cheat. They turned a game of chance into a game of skill, then excelled at that skill. Of course this has happened to other games as well, such as with card counting in blackjack, which is also inaccurately described as cheating when it's actually mastery of the game.

[+] peapicker|9 years ago|reply
Change to roulette, chaos theory, and physicists -- using 8bit hardware in shoes -- and you get the fascinating book "The Eudaemonic Pie" by Thomas Bass. Highly recommended.
[+] Zanni|9 years ago|reply
Came here to say the same thing. Brilliant book. A team of physicists created a computer to track a roulette ball and wheel with sufficient accuracy to gain a whopping 40% advantage over the house. Their hardware was never reliable enough (in terms of not catching on fire, the predictions were good) to make much money. Doyne Farmer, a member of the team basically invented the field of chaos theory, then went on to make a fortune on Wall Street.
[+] justinpombrio|9 years ago|reply
By "Can't fix", they mean "could fix by putting in new slot machines whose PRNGs aren't crackable, but choose not to because it wouldn't be cost effective".

Why don't slot machines use true random numbers? They could still skew the results however they like.

[+] jjuel|9 years ago|reply
The true fix is just to replace the machines. As they said the newer machines have encryption to hide the PRNG. Obviously some places can't do that, and the company is not doing it for free. So technically the casinos cannot fix the compromised machines themselves, but they could just replace them.
[+] brilliantcode|9 years ago|reply
Somebody play a tune on the world's smallest violin. People kill themselves because of casino normalizes self destructive behavior. So a bunch of impoverished engineers figure out a way to beat an outfit that profit's off from ripping people off. More power to them. I hope they take out all the fucking casino's ripping people off. Not that I condone hacking but casino really doesn't even register on my empathy list. Fuck them.

It should be legal to burn money also because people love doing it at a swanky place like casinos. At least you won't see people get addicted to dousing your cash with gasoline and throwing a cigarette at it.

I just thought of it and it seems quite exhilarating at the prospect....but it is safer and less addictive than gambling in casinos.

[+] jcoffland|9 years ago|reply
> As Hoke notes, Aristocrat, Novomatic, and any other manufacturers whose PRNGs have been cracked “would have to pull all the machines out of service and put something else in, and they’re not going to do that.”

This just goes to show that despite the money the casinos are losing to this Russian group, they are still making so much money off the people they are cheating that it's not worth fixing the problem.

Why our governments protect the jerks who steal money from the less intelligent members of our society is beyond me. That there are laws that support casinos is no justification. Casinos are themselves a scam and should not be protected against scammers at the expense of tax payers.

[+] kartan|9 years ago|reply
> Casinos are themselves a scam and should not be protected against scammers at the expense of tax payers.

In Sweden casino gambling, and other types of gambling, is owned by the state. The state keeps the money from the gamblers. It is like an extra tax that people can choose by themselves. In Spain it is similar for Lottery, it moves a lot of money in Christmas and the state keeps the profits. Any country can achieve similar results applying high taxes to gambling.

I think that forbidding gambling is an error, as it just moves it to more unsafe locations and opens good business for criminal organizations. Standards that regulate gambling are a better solution, it reduces gambling addiction creating less attractive gambling games, it forbids to loan money to gamblers while they are playing (that is really important), and in general keeps gambling in check.

Disclaimer: I have worked in the gambling industry, and I will probably do it in the future.

[+] greggyb|9 years ago|reply
Why our governments are the jerks who steal money from the less intelligent members of our society is beyond me. That there are lotteries in every state is no justification. Lotteries are themselves a scam and should not be protected against scammers at the expense of tax payers.
[+] usgroup|9 years ago|reply
"Casino is entertainment for which you pay a probabilistic fee proportionate to your spend". Ok, a bit of a stretch, I personally think. I honestly think that people gamble on things like slots because they don't have an educated sense of probability. I'm not sure the transaction is quite as clean as buying a cinema ticket and trading cash for entertainment.

"These guys were right to do it". I think the edge exists because it's ultimately illegal. I think it's tantamount to an illegal distribution of cash from a casino to a mob. Would it be any different if they hacked their bank account?

[+] gwbas1c|9 years ago|reply
I wonder if there's enough variation in how people pull the handles and push the buttons that they could be used to partially re-seed the PRNG frequently enough that it the seed can't be determined by a video?
[+] CapacitorSet|9 years ago|reply
That's the technique Linux uses, it feeds keyboard and mouse timing events into one of its entropy pools. I can't see why they wouldn't do this for slot machines.
[+] Aardwolf|9 years ago|reply
Since the title says "Can't Fix": Isn't it fixable by injecting some entropy into the PRNG for every roll like button press durations in nanoseconds, temperature, hardware quantum based, ...?
[+] y7|9 years ago|reply
Easier fix: using a cryptographically secure PRNG. Like the article mentions, newer machines employ this technique, but of course it costs money to replace them.
[+] mnw21cam|9 years ago|reply
Yes. That costs money, and requires the machine to be re-certified by the authorities.
[+] digler999|9 years ago|reply
you'd have to do a hardware mod, and gaming is a regulated industry. so every mod you do has to be submitted to a state or nationwide gaming regulatory authority, takes months (at least) to get approval, and costs easily $100k.

Not to mention full regression testing on the statistics of the game. You would have to "re-prove" the validity of the RNG , which requires another QA cycle, statistical expert, and game designer (to ensure that the frequency and distribution of wins matches the specification sheet)