Richard Marcus

Sunday, June 29, 2008

Annie Duke Speaks Out Again on Absolute Poker and Ultimate Bet Cheating Scandals


The cheating scandals surrounding online poker sites UltimateBet.com and its sister Absolute Poker.com continue to make waves in both the mainstream and industry media and in the player community, and the latest element in what seems to be a concerted damage control initiative by the owners is a Poker News video-streamed interview with the much respected poker pro Annie Duke.

This can be accessed at the Poker News Website,

Duke has a long association with UltimateBet and has been involved in both operational and branding endorsement for the website. Apparently last fall she was disenchanted with the way things were going and was thinking about distancing herself from the enterprise. In January this year, the 'hole card' scandal broke and apparently the change of management that occurred convinced Duke to revise her position in a move that was "a big 180 for me."

The cause of this epiphany was apparently the transparency of the new management, headed by CEO Paul Leggett; the way in which it handled the crisis (paying out an unspecified but claimed "seven figures" to affected players); getting rid of the "bad apples" responsible for the scandal and a bigger say for Duke in the conduct of the business.

Judging by her comments in the interview Duke is now firmly on board and confident that the historical problems have been fully addressed, although management is still considering the pursuit of those responsible. This is apparently problematical due to legal considerations around identifying the culprits and under which jurisdiction to pursue them.

Duke follows the company line in claiming that company revenues were not affected by the crisis, which is surprising when one considers the magnitude of the cheating and the editorial coverage it received. The company strategy of recruiting big poker names to endorse the website is also apparent in her comments.

Listening to the interview, there are confusing references to both 'change of management' and 'change of ownership'. This gives little clarity on who owned Absolute/Ultimate Bet prior to its acquisition by Tokwiro Enterprises, a Kahnawake registered company owned by former Mohawk grand chief Joe Norton, or what Tokwiro paid for the companies and when.

The UltimateBet story is not about to fade away. In her interview Duke confirmed information circulating for some months in the industry that the mainstream television investigative program "60 Minutes" is about to air the scandals. Producers for the program contacted Duke whilst she was at the ongoing World Series of Poker, although she does not amplify what was discussed.

Subjectively speaking, we had the impression that this was a continuation of the damage control initiative which the "new management" has been so vigorously pursuing, suggesting that the impact of the cheating scandal may have been bigger than UB would like to acknowledge. The role of the major poker forums in driving the resolution of these scandals also appeared to be underplayed, whilst the proposition that bashing UB was not good for the industry is arguable.

That said, the potential for harm to the industry's credibility that an adverse "60 Minutes" take on the affair is likely to have is a legitimate concern. What a pity that the systems at UB/AP failed in the first place, bringing about this crisis.

Labels: , ,

Tuesday, June 24, 2008

Bodog Signs Another Poker Cheat!



Bodog Signs Reformed Justin Bonomo!

It seems to be par for the course: Get caught in an online poker scam, then say you´re sorry, apologize to everyone and his mother reading the poker blogs, then sign a deal for big bucks with a major online poker room. Such is the case again, this time with Justin Bonomo, better known as "ZeeJustin" who was caught cheating by playing on multiple accounts on sites like PartyPoker and PokerStars. (To read more on previous online cheats who signed big poker deals, click here.

Oh how I wish I had been caught cheating at online poker! Then I could have signed a big contract with Bodog too! Only problem, I was never an online poker cheat. In my next life, I will have to consider changing professions!

As reported by Jennifer Newell:

On May 5th, 2008, Bodog Poker announced that it had signed Justin Bonomo to its roster of pros, which already includes David Williams, Jean-Robert Bellande, and Evelyn Ng. Justin will represent Bodog both in live tournaments and online at Bodog, as well as possibly participating in other marketing and branding opportunities.

Poker pros ink deals regularly with online poker sites. Why is this one significant and worthy of a column? Because Justin is the Justin Bonomo, better known as “ZeeJustin” in online poker circles—the player who was caught cheating by playing on multiple accounts on sites like PartyPoker and PokerStars. And though he didn't handle the scandal well when it happened—he was not even 21 years old—he has since matured, taken particular care to address the problem, and changed.

When the scandal first broke in early 2006, Justin was not afraid to post on web forums with his excuses and justifications for using multiple accounts. He claimed that he did so because his style under “ZeeJustin” was too wellknown, and he needed to be anonymous in order to win more money. Granted, that is a simplification of his reasons for the sake of space in this column.

Eventually, the wrath he felt from the poker community caused Justin to realize the impact of what he had done, and his justifications turned to apologies. In his immaturity, he even attempted to strike a deal with PokerStars that would allow him to play on the site for several months, with all proceeds going to charity. “For me, the benefits are obvious,” he wrote to PokerStars. “I would get to play on your site again and return some credibility to my name, but more importantly, I see this as a way to become the person I've always told myself I would be. This won't be a one-time thing. This is how I want to live the rest of my life… Basically, I realize that what I've done is terrible, but I

refuse to accept the fact that those actions define me as a person. I see this as a way to overcome what I've done, not as a poker player, or a wanna-be celebrity, but as a human being.”

The site ultimately denied his request. Justin then took his poker skills to the live tables once he became of legal age to play in the United States. He played tournaments humbly and quietly, not drawing any attention to himself. He allowed time to heal wounds, and in the year and a half that he has been on the circuit, he has eventually gained the respect of many poker players who have seen his remorse and witnessed his true love of the game.

What makes Justin different from recent players involved in cheating scandals, like Sorel Mizzi and JJ Prodigy, is that he grew to understand the severity of his previous actions and let some time pass as he carefully repaired his image. Though he's still in his very early twenties, he seems to have matured immensely. Players like Mizzi seem to expect immediate acceptance of whatever apology is issued, and they come to tournaments as cocky and full of themselves as ever. As basic as it may seem, people need time to accept apologies and see another side of those players, and Mizzi is one of several who do not seem to understand this.

Justin Bonomo has become a successful live tournament player, with final tables at EPT and WSOP events to his credit, as well as several near-televised WPT tables. He has made over $1.1 million in his short time on the circuit, and the Bodog sponsorship appears to be a positive step in his journey.

Labels: ,

Sunday, June 22, 2008

Rash Of Employee/Insider Slot Cheat Scams Rocking US Casinos


Nation´s New Slot Machine Casinos Will Have To Deal With Slot Machine Cheating and Slot Cheats Smarter Than Their Own Technicians And Security Staffs!

With new slot machine-only casinos popping up at racetracks all over the country and in states like Pennsylvania, cheat-wise employees are going into business for themselves. I have gathered information from both inside sources and newspapers that details some inventive new slot cheating scams put down by casino employees.

High-tech thieves have discovered a new way to rip off slot machines - stealing more than $1 million from the Orleans before management shut down their computer-assisted heist. Gaming regulators say the crime - one of the largest in years - shows a vulnerability in casino security that could lead to new surveillance standards. The theft began in September 2006 and allegedly involved three slot workers who, over several months, manipulated software that prints slot machine payout tickets. They allegedly worked with two accomplices who posed as customers and cashed the tickets.
One defendant, slot technician Seferino Romero, pleaded guilty last month and will be
sentenced in Clark County District Court on Jan. 24. Felony theft carries a maximum 10-year prison term. His attorney, Jeffrey Segal, said his client didn’t mastermind the heist and has agreed to pay restitution of $100,000. "I think that his actions subsequent to the conduct indicate that this is a person of good character who got caught up in something and realizes it was a mistake," Segal said.
The Orleans incident shows that other casinos are similarly vulnerable to inside jobs by casino workers, security experts say. Employee theft - sometimes as simple as pocketing cash or chips - is a recurring problem in the cash-rich industry, which can corrupt the most trusted employees. Most crimes are not publicized by casinos and regulators are reluctant to discuss them for fear of tipping thieves to new techniques. Boyd Gaming Corp., which owns the Orleans, declined to discuss the particulars of this case, which is still in progress. "It could compromise the investigation" and assist other cheats, spokesman Rob Stillwell said.
Four other defendants are awaiting arraignment next year on felony theft charges. The
Gaming Control Board’s enforcement chief says the Orleans incident was a new one to him, although it had a familiar ring to security experts.
In this case, Orleans workers printed winning tickets on test machines in a back room, using software allowing the machines to mimic machines on the slot floor that had been turned off, investigators told the Sun. The tickets were for relatively small amounts - a few hundred dollars each - to escape the notice of casino bosses. Stealing from cashless machines is a new challenge for thieves. Casinos have turned from coin slot machines to ticket machines because they are easily played and maintained and had been considered more secure than old-generation coin slots,
which skilled thieves could quickly compromise using mechanical tools such as magnets and metal wands. These newer thefts typically involve casino employees with access to sensitive areas of a casino’s nerve center. And therein lies the problem - and the solution - for casinos. The slot technicians involved in the Orleans theft had appropriate access to the slot testing room but probably shouldn’t have been allowed to tinker with the slot system that communicates with the machines on the floor without some interaction with other departments or higher-ups, said Jerry Markling, chief of the Gaming Control Board’s enforcement division. The good news for casinos is that "these are no longer easy scams" and can mostly be defeated with "strong internal controls," Markling said. Michael Crump, a Fresno-based slot
security consultant, said the Orleans case is typical of an emerging scam that is foiling casinos nationwide. Many casinos rely on manufacturers to create security clearances for casino employees to access their slot tracking software, said Crump, a former executive with Boyd Gaming in Las Vegas. But those casinos may lose track of what clearances those employees have, allowing them to exploit the system later on, he said. Typically, employees who steal have stumbled upon access they shouldn’t have, he said. What’s especially troubling for casinos is that some employees can cover their tracks by erasing transactions or signals that could red-flag auditors, he said. The theft came to light during last month’s Gaming Control Board meeting, when regulators discussed and approved a request by the South Point to put slot machines in a relatively remote part of its casino. Regulators worried about surveillance and the casino offered to post either a security guard or a slot technician at the machines. At the meeting, board member Randy Sayre said ticket machines may not be as secure as industry executives would like to believe. "It’s not just a matter of, we have got the room, we have the people to watch it, let’s put (slots) out there," he said. "Technology is moving forward on us and the bad guys are getting smarter." Regulators are loath to discuss details of how slot machines can be exploited, but indicated that, in a general sense, surveillance of the slots is important. Regulators generally require surveillance cameras on remote machines, though regulations specify dedicated cameras only for big jackpot machines. Some casinos don’t train cameras on machines that have been shut down. Cameras may not stop an actual theft but they can be used to watch employees who might be breaking some procedure by, say, not being on the floor when they should, Crump said. Still, security clearances, rather than surveillance, are the real culprit in this case, he said. Sayre says his concern isn’t with the distance of any particular slot machine from the main casino floor but the possibility that with the spread of slot machines into remote areas, a casino’s security staff could be spread too thin. He says a standard policy for surveillance of remote machines would help casinos and regulators combat crooks. Sayre wonders whether manning the machines with a gaming employee would be preferable to a guard, who is trained to spot underage gamblers but perhaps not as familiar with the technical aspects of the games and how they can be compromised by cheats. Casinos lose an estimated 6 percent of revenue to internal theft, which is chalked up as a cost of doing business, Crump said. Many thieves prefer to ply their trade at smaller casinos outside of Nevada with cruder security mechanisms, he said. But Las Vegas eventually attracts the
most accomplished and polished criminals, who try their hand here "to prove they can get away with it." The Orleans scam was hardly the perfect crime, Markling said. "It was only a matter of time" before the thieves were caught because the casino’s high-tech slot monitoring systems can detect deviations from the expected payout of any particular slot machine, he said.

Scam #2
Arizona ~ East Valley Tribune

Two employees of the Vee Quiva Casino in Laveen have been indicted for allegedly stealing $9,400 in non-existent slot machine jackpots. Jason C. Beal, 31, and Fernando Lechuga, 25, both of Phoenix, will be tried in January for theft by an officer or employee of a gaming establishment on Indian lands. If found guilty, they each face up to 20 years in prison and a fine of $1 million. According to federal prosecutors, Lechuga, a slot attendant, and Beal, a slot assistant supervisor, wrote and signed jackpot slips for $4,900 and $4,500. A review of surveillance tapes confirmed the jackpots never occurred.

Scam #3
Florida . Sun Sentinel

The Florida Department of Law Enforcement is investigating an alleged slot-machine theft ring by employees at Gulfstream Park Racing & Casino. This is the first potential scandal for the fledgling industry, which is both heavily regulated and heavily taxed by the state. And I’m the one bringing you the news for one reason: The largest newspaper in Broward County, the Sun-Sentinel, had the story first but got cold feet and decided not to publish it. Before we examine the Sun-Sentinel’s apparent cowardice, let’s look at the emerging scandal at Gulfstream, one of the county’s four pari-mutuels and the first to unveil voterapproved, Las Vegas-style slot machines last year. FDLE spokeswoman Paige Patterson-Hughes confirmed that her agency, which has a regulatory office on Gulfstream grounds in Hallandale Beach, is criminally investigating the casino, although she declined to provide any details. The investigation is centered on promotional cards used to generate interest in the
slot machines, according to sources in the gambling industry and in Tallahassee.
Local casinos provide patrons with the cards, which usually hold $25 to $100 worth of "nonredeemable credits" to play the slots. Patrons can cash in any winnings beyond the card’s originally assigned value. Gulfstream employees are alleged to have exploited the promotion either by playing with large amounts of money on the cards or by their unauthorized selling. Cards used to test the machines also may have been involved in the scam, sources say. Sources also indicate that a Gulfstream executive has been removed from his post while this investigation continues. Gulfstream spokesman Mike Mullaney was almost laughably coy about this. When I asked whether the executive in question had been fired, Mullaney said, "I haven’t seen him around in a while." Mullaney downplayed the investigation. But Gulfstream’s filings to the state reveal that hundreds of thousands of dollars may have been involved in the alleged scam. Gulfstream reported that it gave out a whopping $1,051,000 in nonredeemable credits during July and August. In that same period, Mardi Gras Gaming, a larger casino that does about twice the slots business of Gulfstream, reported using only $108,000 of the credits. Since the investigation began, Gulfstream’s numbers have come back in line, according to state filings. In October, the casino reported using just $107,986 in nonredeemable credits, a huge decline from previous months. Mullaney claimed he wasn’t aware of those numbers. "I’ll have to defer to our accounting department about that," he said. "If there is an investigation, any comment I make could jeopardize it." Mullaney did offer that he had heard people were speculating that millions of dollars were involved in a Gulfstream theft. "I can’t imagine it’s millions of dollars," said. "That boggles the mind." Mardi Gras President Dan Adkins said the Gulfstream investigation could
have far-ranging effects on the industry, which is already hampered by an effective 62-percent tax rate. "To have something like this, which is a scar, a black mark, on all the hard work we’ve done . it hurts me," he said. Mardi Gras would have caught the anomalous numbers immediately, Adkins said, due to its "controls and sophisticated accounting system." State Sen. Steve Geller, who confirmed that the FDLE investigation involves allegedly misused nonredeemable credits, said pari-mutuels are so strictly regulated that any scams are bound to be discovered sooner or later. "It’s impossible to get away with, but the higher up the ladder it goes in terms of management, the longer it takes to get caught," he said. Mullaney said Gulfstream has fully cooperated with the investigation. "As a gaming enterprise, integrity and dignity and credibility are of utmost importance to us," he said. "It’s
in our best interest to play ball with FDLE, which is stationed here anyway." Meanwhile, Mullaney said the first call from the media about the investigation did not come from me but from Sun-Sentinel reporter John Holland. Mullaney said Holland asked him questions and told him the daily newspaper was going to publish an article about the investigation nearly two weeks ago. "But the days came and went without a story," Mullaney told me. "I wasted two dollars and five cents on the Sentinel looking for that story." Holland declined to comment. Sources at the Sun-Sentinel say his article about the investigation was edited and vetted by a lawyer, then killed at the last minute. Earl Maucker, the paper’s executive editor, at one point told Holland to speak with a Gulfstream executive who wanted the story spiked, a veteran Sun-Sentinel reporter said. Gulfstream regularly runs large ads in the Sun-Sentinel. Maucker did not return my calls for comment. Others at the Sun-Sentinel say they heard the story was not published because editors were concerned that it used unnamed sources and because editors were worried that such news could harm the gambling industry. Some in the newsroom were angered by the decision. "A
lot of people are upset about it," one reporter told me. The Sun-Sentinel’s circulation has plummeted lately. At the same time, the paper is undergoing what its management calls "transformative change." To some degree, this entails blending reporting with advertising and marketing. The idea is to better serve advertising
clients as well as readers, even as readers fall away. Traditionally, reporting has been kept strictly separate from the interests of advertisers. The fate of the Gulfstream story in the Sun-Sentinel’s newsroom could be a sign that the paper is not just bridging departments but that its hunt for revenues in an increasingly grim industry has overtaken its journalism, which would be far worse than whatever happened on the slots floor of a local casino.

Scam #4

Intelligence received: A casino reports the detection of an employee working in collusion with outside agents to steal downloadable credits from slot machines. The employee worked in the rewards center and loaded up unearned and undeserved credits onto cards for friends/family. A significant amount of money was stolen. Some of the tells seen when these cards were used: - Suspects had multiple cards in possession and used all - Print out of TITO or cash out credits after every win - No further
play when e-play was used up - Account in false name or identities (player did not match description)
- Kiosks were used to cash in for relatively small amounts $50, $100 etc.
- Employee used another clerk.s computer log-in and password. Noted in paperwork: -
Blocks of numbered card stock were taken in quantity by employee.
- PIN numbers changed frequently on accounts (every few minutes)
It is recommended PIN changes, redemption lists and card issuance reports be checked on a routine basis.

Labels: ,

Friday, May 23, 2008

Build Your Own Poker Cheating Bot!


HOW I BUILT MY OWN POKER BOT!

This article was written by James Devlin, who I do not know personally, but after reading his article on how he created his own winning online poker bot, I am quite impressed, and I agree with his declaration that poker bots are getting better and better and that soon online poker rooms will be populated more by poker bots than by legitimate online players. Remember, two years ago in my book "Dirty Poker," I made the statement that within a decade bots would account for more than 90% of online players. Add to that the rampant collusion play and you will have more than 99 percent of online poker players cheating!...unless of course some drastic changes occur in online poker.

Here is Devlin´s article, and I will have more on this tomorrow!

Several years ago, a client asked me to come up with a prototype for a real-money online poker bot. That's right: a piece of software you park on your computer while it goes out to a site like PokerStars or Full Tilt and plays no-limit Holdem for you, at 4 or 14 different tables, for real-money stakes.

If you're a poker player, and particularly if you're an online poker player, you've probably heard rumors about the rise of the poker bots. Unfortunately there's very little hard information out there (for obvious reasons) about how to build one of these bots. In fact, many so-called authorities still dismiss poker bots as a relic of the overactive poker player's imagination.

Well, I'm here to tell you that online poker bots are 100% real, and I know this because I've built one. And if I can build one, well. Anybody can build one. What's more, over the course of this multi-part article, I'll show you how.


That, ladies and gents, is a picture of a full-featured poker bot managing three play-money tables (note: this same bot also handles real-money tables) at an honest-to-goodness, real-money online poker site. Of course, it could be any site. The bot implementation I'm going to reveal will work at all major online poker sites, including Poker Stars, Full Tilt, Party Poker, Ultimate Bet, and most other major venues.

Why are you giving this information out?
I debated for a long time whether or not to make this information public, as I'm a poker player myself and have no desire to see the game ruined by an avalanche of poker bots. It's not that building a poker bot is some sort of black magic, known only to the privileged few. Any competent programmer can build one. But this information hasn't, so far as I know, been collected and presented in one place, certainly not as a "How To" complete with sample code. So the question I struggled with was this: is it irresponsible to publicize this information, such that every Internet script kiddie out there now has the ammunition he needs to actually build a bot?

After thinking about it, I've decided that keeping the technology of poker bot building secret is like declaring that only criminals can carry handguns. The fact is, there are people in the world right now who are doing this.

Poker bots, underground online poker boiler rooms, and collusion are a reality. That doesn't mean online poker's not worth playing, just that it pays to be educated about what's possible. Furthermore, there should be public discussion regarding what to do about it because one thing's certain: computers and programming languages aren't exactly going to be getting less powerful. The rise of the poker bots is a virtual certainty. I'd like to see the major online poker venues open up their famously vague "bot detection" and "anti-collusion" strategies to public scrutiny, as cryptography and security providers learned to do years ago. The best security algorithms and techniques all have the weight of public review behind them and I don't see how online poker's any different.

But even assuming all that weren't the case:

Poker bots already exist on the open market. Do a little creative Internet searching.
The poker community suffers from an irrational fear of bots. I'd gladly risk my money against most homegrown bots and trust me: you would too.
I believe that bots are actually good for the game of poker. Mike Caro, "the Mad Genius of Poker," expressed a similar idea years ago.
Any programmer worth his salt can build a bot with or without this document. They already have.
If you're visiting this page from 2 + 2 or another poker community, and you want to stay on top of this article (which will be in several parts), you can subscribe to the Coding the Wheel RSS feed or get it in your email inbox as I don't participate in these communities often. For easy digestibility, I'll be organizing these posts using a question and answer format, as there's a lot of highly technical material to cover.

Now, without further ado, let's talk about the basics. If you're not a programmer, fair warning: highly technical, possibly excruciatingly boring material ahead.

Basic poker bot responsibilities
At a very high level, the poker bot is best analyzed according to the classic model of information handling: Input, Processing, Output.

You'll find that your programming tasks decompose rather nicely into these three basic stages.

Input. The input to the system is the poker client software itself, including all its windows, log files, and hand histories, as well as internal (often private) state maintained by the running executable. The goal of the input stage is to interrogate the poker client and produce an accurate model of the table state - your hole cards, names and stack sizes of your opponents, current bets, and so forth.

Processing. The processing stage runs independently of the other two stages. It's job is to take the table model assembled during the Input phase, and figure out whether to fold, check, bet, raise, or call. That's it. The code that performs this analysis should (ideally) know nothing about screen scraping or interrogating other applications. All it knows is how to take an abstract model of a poker table (probably expressed as some sort of PokerTable class) and determine which betting action to make.

Output. Once the processing stage has made a decision, the Output stage takes over. It's tasked with clicking the correct buttons on the screen, or simulating whatever user input is necessary in order to actually make the action occur on a given poker site/client.

How does the bot figure out what its hole cards (and the board cards) are?
This is a broad question which it's better to break down into particulars. First of all, there's a very easy way to detect hole cards via a screen-scraping or "poor-man's OCR" approach. You don't have to be an image-recognition expert. All you have to know is how to get the color of a handful of different pixels on the screen. Or to put it another way, for any given card in the deck, there are a handful of pixels you can test which will uniquely identify that card.

That's fairly easy to implement, and requires zero knowledge of OCR, image recognition, graphics processing, etc. But depending on the specific poker site, pulling card rank and suit information might be even easier. On some sites, the hole cards will be emitted into the real-time game summary info:

Occasionally you'll find that hole cards are emitted into the log file. Poker Stars, for example, conveniently emits this information into its log file, and it does so in real time (meaning you can snoop on it in real time, and in the next installment, I'll show you how):

MSG_TABLE_SUBSCR_ACTIONMSG_TABLE_SUBSCR_DEALPLAYERCARDS sit1 nCards=2 sit3 nCards=2 sit5 nCards=2 sit6 nCards=2 sit7 nCards=2 dealerPos=3TableAnimation::dealPlayerCardsMSG_TABLE_PLAYERCARDS 00260C82::: 8s <-- Hole Card 1, Cool!::: 13c <-- Hole Card 2, Cool!Last but not least, hole cards are always included in the hand history for a given game:

*** HOLE CARDS ***
Dealt to CodingTheWheel [Qs 9h]
MargeLeb: calls 10
ke4njd: calls 10
diamondlover2nite: calls 10
franklg454: folds
WhoAmINot: calls 5
CodingTheWheel: checks
*** FLOP *** [4h 7c Qd]
WhoAmINot: checks
CodingTheWheel: bets 10
The only problem is that, in many cases, the hand history file isn't emitted until the end of the hand.

How should the poker bot be structured, as a single EXE, a bunch of DLLs, what?
You will need:

An executable file (.EXE) to display the bot's UI, and to contain the processing logic (the stuff that knows how to play poker).
A dynamic link library (.DLL) to handle the Input (screen scraping) and Output (clicking buttons) processing. You'll inject this DLL into the poker client's process so that your code is effectively running as part of PokerStars, or FullTilt, or whatever site you're using. This will make your life a lot easier both when it comes to collecting data as well as doing things like simulating genuine user input.
Those two pieces are essential. Other than that, you're free to structure things however you want. I'll have more to say on this as we get into the nitty-gritty details of the implementation.

How do I inject my code into the poker client process?
There are a number of well-documented techniques for injecting your code - for example, a DLL you've written - into another application's address space. The method I used, and the method I'm going to recommend you use, is by installing what's known as a Windows Hook and specifically a CBT Hook. The relevant Windows API is SetWindowsHookEx, and here's the actual source code. If you're familiar with C++ and the Windows API, it should be straightforward:

///////////////////////////////////////////////////////////////////////////////
// This is the CBT hook procedure. The HCBT_CREATEWND notification generally
// doesn't give us any useful information about the window because WM_CREATE
// hasn't been called for the window yet. So instead we don't consider the
// window as created until it's gotten it's first WM_ACTIVATE (note: this is
// how it works on Poker Stars, the behavior may need to be changed for other sites)
///////////////////////////////////////////////////////////////////////////////
LRESULT CALLBACK PokerBotCBTProc(int nCode, WPARAM wParam, LPARAM lParam)
{
if (nCode < 0)
{
return CallNextHookEx(g_hHook, nCode, wParam, lParam);
}
else if (theInjector.getVenue() != Venue_Unknown) // ignore this bit of code for now..
{
// Since we can't use DllMain, perform initialization the first time the hook is called.
if (g_bFirstTime)
{
theInjector.inject();
bFirstTime = false;
}

// These are the only notifications we're interested in passing on.
if (nCode == HCBT_ACTIVATE)
return (LRESULT) theInjector.HandleIt(Hook_Activate, (HWND)wParam);
else if (nCode == HCBT_CREATEWND)
return (LRESULT) theInjector.HandleIt(Hook_Create, (HWND)wParam);
else if (nCode == HCBT_DESTROYWND)
return theInjector.HandleIt(Hook_Destroy, (HWND)wParam);
}

// Return 0 to allow window creation/destruction/activation to proceed as normal.
return 0;
}

///////////////////////////////////////////////////////////////////////////////
// Publically exported hook installation function. The bot will call this on
// startup in order to inject this DLL (the DLL that contains this function)
// into the address space of every process, including every poker client process,
// on the machine.
///////////////////////////////////////////////////////////////////////////////
bool OPCHOOK_API InstallHooks()
{
// Actually install the hook...
g_hHook = SetWindowsHookEx(WH_CBT, (HOOKPROC) AutoCBTProc, hInstance, 0);
return g_hHook != NULL;
}
The above source code would live in a DLL: the DLL you plan on injecting into the poker client's address space. This DLL will also contain whatever code you write to handle the "input" (screen-scraping) and "output" (button-clicking) stages of the bot.

An even better way is to use a two-stage injection process. The problem with global CBT hooks (or any other kind of global hook for that matter) is that they cause the hook DLL to be loaded into the address space of every process on the machine. If your hook DLL is very fat (for example, if it contains a bunch of code to do screen scraping and so forth) this can impact system performance as your DLL will get mapped into processes you care nothing about, like Notepad.exe.

So to get around that, make the hook DLL - the DLL that gets loaded into every process - as lightweight as possible. Then, whenever the hook DLL detects that it's been loaded by a poker client process, such as POKERSTARS.EXE, have it explicitly load another DLL (again, written by you) containing the bulk of the bot I/O processing code. This in fact is the purpose of the theInjector object in the above code sample - it figures out if the DLL is being mapped into a poker client process and, if so, uses LoadLibrary to load the actual DLL that knows how to do things like screen-scraping and so forth.

Here, INJECT.DLL would be a lightweight DLL, written by you, which contains the CBT Hook procedure and installation code I showed you above. POKERBOT.DLL is the fat, messy DLL, also written by you, that contains the poker bot's screen-scraping logic.

Do things this way, and the drag on the system shouldn't even be noticeable, other than a brief load period when you first install the hook. This method is a lot easier than most other methods of DLL injection, and more importantly, it's supported across all the major Windows operating systems.

How do I retrieve the game summary text from the poker table window?
Almost every online poker client displays a small window in which game summary text is displayed.

Now, depending on which poker client you're using, this window may or may not be a standard Windows edit box or rich text control.

If it is a standard Windows control, you can get the handle (HWND) to the window, and then get its text via the GetWindowText API. Furthermore, you can do this even if the window you're interrogating is owned by another process.

But what you'll find is that many poker clients don't use "normal" Windows controls. They may write their own custom display controls, or they may subclass a standard Windows control and cause WM_GETTEXT to return an empty string.

In that case you have at least three options, none of them trivial:

You can investigate the control at the binary level. No matter how customized the control, somewhere in memory it's maintaining a string or a list of string which contains the game summary text. Since your code will be running inside the poker client's process, you're free to do whatever you want to do - investigate different areas of memory, subclass the control, etc.
You can use API hooking to hook the core Windows APIs that every control uses to display text: DrawText, ExtTextOut, etc.
You can use full-fledged OCR to analyze the text window and return the text. But this is probably overkill, especially since text tends to run through the summary window rapidly.
When building the bot, I went with the second approach: API Hooking. Once you know how to hook a particular Windows API, so that whenever POKERSTARS.EXE thinks it's calling DrawText, it's actually calling your custom version of DrawText, which snoops on the text before passing the call on to the original DrawText, it's a simple matter to examine the output coordinates to determine, aha: this text is being written to the summary window; this text is being written to the title bar; etc.

This is a deep enough topic that I'll roll it into its own installment along with specific code examples.

Hook a Windows API? Instrumentation? What does that mean?
Every Windows application in the world has to call into the Windows API to get things done: open files, create windows, display text, etc. Even language-specific libraries such as the C run time library or the C++ standard library internally will use the OS-provided facilities to work with things like files, memory, and so forth.

API hooking or "instrumentation" is the process of intercepting the function calls that an application (any application) makes, and redirecting them to a custom function defined by you. Specifically, you're going to intercept some of the calls that the poker application makes to the Windows API...

DrawText
ExtTextOut
WriteFile
etc
...and redirect these calls to a custom "interceptor" function, written by you. Your code thus gets a chance to examine the parameters of the call (which could be a string containing the player's name, for example) and do any other work you desire. When your "preprocessing" is done, you'll pass control back to the original API the poker application thought it was calling in the first place so that everything works transparently.

This technique can be used to extract all manner of useful internal information from any application, not just online poker clients. The best part is: you no longer have to write custom assembler code to achieve this. Instead you'll use a third-party library, and one of the best is a little-known Microsoft Research Project, Detours. Download it. Learn it. Love it. Learning how to accomplish API instrumentation means that ultimately, there's nothing the poker client can really hide from you - but that doesn't mean you'll be able to snoop around and figure out your opponent's hole cards. Don't even try. Unless the implementors have been sloppy, that information won't exist anywhere on your machine until your opponents have actually flipped their hole cards over.

And yes, if there's sufficient interest I'll put together a dedicated post with sample code showing exactly how to instrument a poker application.

Generally speaking, how do I go about harvesting data from an online poker game?
We've covered a few of the specifics so far, and we'll cover many, many more in future installments. But specific techniques aside, getting information from the poker client is an exercise in detective work. First of all, be aware of just how much information is available:

Visual Table State. Everything a human player sees when playing online poker: his hole cards; the names, stack sizes, and betting actions of all players at the table; the position of the button; and so forth..
Summary Text. Each table usually displays a text summary area which captures various betting actions, the beginning and end of new hands, etc.
Action Buttons. These are the buttons the user clicks in order to Fold, Raise, Call, etc. Note that we can use the presence or absence of various action buttons to infer table state.
Log File. Many poker clients output a log file which may contain helpful information.
Hand Histories. Most poker clients output a formal "hand history file" which contains a complete description of a single hand of poker.
Internal Stuff. Internally, most poker client makes standard calls to the C run-time library, the C++ standard library, and the Windows API. You can eavesdrop on these calls through a process known as API "hooking" or instrumentation. Additionally, poker clients, like all software, use memory to store things. Things like player names, cards, and betting actions.
And more. Stuff I may not know about, or may have chosen not to mention.
The bot's job is simply to eavesdrop on that information, and analyze it to produce an accurate model of the table's state at any given point in time. So any technique now or in the future which allows you to do that is potentially a technique you'll want to leverage in the bot. Later, I'll suggest an architecture whereby a number of different interrogators can be used to query poker tables in a simple, extensible, and above all tweakable way.

How do I create a bot that's intelligent enough to play winning poker?
That's the million-dollar question. I could tell you that the folks over at the University of Alberta's Computer Poker Research Group have made impressive headway towards producing a winning poker bot. I could tell you that extensible rules-based systems like the one I implemented for my bot...



...are a lot more powerful than you think. I could tell you a lot of things, and we'll investigate how to leverage some of the poker bot frameworks that are already out there, and how to combine those with your own custom rulesets. But understand one thing: you don't have to create a winning poker bot in order to make money with a poker bot. All you have to do is create a bot that's capable of breaking even.

If you can create a bot that breaks even - neither wins nor loses money - rakeback deals and specific programs like the Poker Stars Supernove Elite will ensure that you get a fairly hefty payday per bot account. I mean many tens of thousands of dollars per year, per account. And nothing except the logistical nightmare of it all restricts you to a single bot account; why not have ten; or a hundred?

And indeed, unbeknownst to the rest of the world, somewhere, someone probably does. But not me, and not you; and that's a disparity in basic firepower I'd like to see remedied, since none of the online poker sites have really stepped up to the plate and either a) made bots legal (similar to the way that they're legal on Internet Chess Club) or b) put effective prevention measures in place.

What skills will I need to write a bot?
Well, you'll want to be well-versed in the nuances of C++ and the Windows API, at a minimum.

In addition to that, you'll either need to be familiar with, or get familiar with, an assortment of Windows development topics that reads like a chapter out of Richter (whose books I highly recommend purchasing and studying if you plan on implementing a bot yourself).

Windowing & GDI
Windows Hooks
Kernel objects
DLL Injection (in general: the injecting of code into other processes)
API Instrumentation (via Detours or similar libraries)
Inter-process Communication (IPC)
Multithreading & synchronization
Simulating user input
Regular expressions (probably through Boost)
Spy++
While it would probably be possible to build a bot using C#, VB.NET, or any other language, you'll find that some of the powers you'll need are only available through specific Windows APIs, and getting access to these APIs from a managed language is a little clunky. Another reason you'll want to use native C++ is that you'll need to sneek some of your code into the client poker process, and it's a lot cleaner to inject a small DLL than it is to inject all the machinery necessary to get managed code to run inside another (native) process.

Conclusion
This post has only scratched the surface of building a full-fledged poker bot. Hopefully it's given you food for thought and possibly whetted your appetite for the mountain of details left to be discussed. Assuming there's sufficient interest, I'll be posting a series of installments, each describing at a detailed level how to accomplish one specific poker bot task. If you found this document through a link on 2 + 2 or one of the other poker forums, you can subscribe to this site in a reader or get it in your email inbox, as I rarely post (or reply) on the poker forums these days.

Labels: , ,

Friday, May 16, 2008

Should Cheats Really Worry About Casino Facial Recognition Software?


Everywhere I go to speak or give seminars, people either ask me or tell me about casino facial recognition software that either will or will not put a major dent in poker and casino cheats´ armor. The claim is that this facial recognition software, which is also being used at airports and other points of entry to the US to recognize and spot terrorists threating global distruction, can focus on facial features of known card counters and casino cheats and identify them against a database before they even have the chance to take their positions at whatever casino tables they will attack.

What do I think of all this? Can this software actually stop someone like me from cheating casinos? If I wore a baseball cap and shades, would the digital cameras zoom in on my nose and calculate the distance between my eyes to identify me? Well, even if it could, there are so many factor that negate the technology, not the lease of which is the human factor, the surveillance personnel who have to be able to use the high-tech equipment to the point where they can actually identify a known cheater. But pushing that factor aside, I don´t believe for a second that the technology is good enough to weed me out from a casino crowd of hundreds if not thousands if I made even the slightest effort to conceal my identity, such as pasting a little makeup or putty on my face. And I have not heard of a single case of a known cheater apprehended while entering a casino or sitting at a table by way of facial recognition technology.

In a word, it´s more hype than not. Purveyors of this technology can make millions of dollars selling this equipment to casinos and casinos have millions of dollars to spend on it. The reality is that if you´re a known poker or casino cheat, the chances of you getting spotted and ID`d by casino facial recognition are no greater than running into your highschool sweeheart in a casino New Year`s Eve in Siberia!

Labels:

Wednesday, May 14, 2008

Live Strip Poker Coming Online!


Live Strip Poker Cheats Coming Online Soon!

Why Cheats? Because anyone willing to strip while playing poker has got to have cheating up his or her sleeve...or up somewhere given the fact that at various times in the poker games the participants will only be wearing their birthday suits! Get it?...I mean totally nude. The opportunities for cheating will be endless...or should I say topless...and bottomless! Whatever the case, you want to know what I´m talking about, right?

Well, there is serious talk about a new online poker room that will offer strip poker in real virtual reality online...whatever that means! I don´t know whether this is going to involve webcams, animation, virtuality, imagery or whatever else, but what I do know is that there will be plenty of "strip cheats" out there online ready to strip away your clothes, virtual clothes, money or virtual money, or whatever the heck this is going to be about. In any case, it sounds like fun and maybe some of you diehard online poker players will be sucked and tantalized away from PokerStars, Bodog and Ladbrokes to try your luck stripping away at your opponents´ clothes instead of chips...Oh yeah, I don´t know if this new strip poker site will be straight, gay, bi, all three or whatever...I don´t even know the name of it for sure, but I have heard that it will be called Livestrippoker.com.

Stay tuned...or should I say "stay dressed!"

Labels: ,

Friday, April 18, 2008

UK Governing bodies seek Anti-Cheating Action on high-risk bets


Cheating scandals in the world of sport have become so prevalent, especially in Europe, that even the pub game of darts has been victimized by cheating scams! Now a network of governing and regulatory bodies has begun to speak out against the cheats orchestrating these major cheating scandals afflicting sports competition. According to the UK Independent, almost every sport offers a multitude of cheating opportunities for individual cheat plays that don't even effect the outcome of matches.

A coalition of every major sports governing body in Britain, including the Football Association and the Premier League, has accused the government of being "complacent" about the "very serious threat" of corruption and cheating that arises through the provision of certain "high-risk" markets by the gambling industry.

The governing bodies want some bet types banned or strictly regulated, as well as more passing of information from bookmakers to governing bodies and funding to police the integrity of sport. Only government can legislate on this, via the Gambling Commission, and despite the coalition "consistently warning" the Gambling Commission about the easy potential for cheating, it believes not enough has been done to stop it.

Earlier this month, the revelation that a UK footballer had colluded with a bookmaker for profit by getting himself benched is one example of a high-risk betting market making corruption and cheating simple. It is possible to bet, for example, on whether there will be a red card (penalties) in a match, and also on tallies of red cards, via spread betting.

In tennis it is possible to bet on double faults and in cricket on whether the first ball of a match will be a wide. These and other examples show sports' constant vulnerability to cheating as a result of certain specialist bets that sport has no control over. One football governing body said: "We know there's a door open to corruption, we know measures could be taken to make corruption harder. But we are powerless to shut the door. That needs legislation."

Tim Payton, a spokes-man on behalf of the coalition--which includes the FA, the Premier League, the RFU and RFL (rugby union and league), the LTA (tennis), the BHA (horse racing), the ECB (cricket) and the BDO (darts)--said: "The sports bodies take the cheating threat from betting very seriously.

"The sports have consistently warned the Gambling Commission that the growth in sports betting threatens their integrity. The sports want stricter regulation of high-risk bets and the right to receive more information on the type of bets being placed.

"The Government cannot afford to be complacent on this issue. The sports have presented them with detailed proposals... that need implementing as soon as possible."

Around $75 billion is spent each year on sports betting in Britain and the coalition members want around $10 million collectively to "police the integrity" of all members. This would pay to monitor betting, collate intelligence on cheating scams, set up legal and disciplinary measures and provide education. At the moment the sports do this individually. Aside from a horse racing levy of around $4 million, the gambling industry pays nothing towards this.

The UK Gambling Commission is sponsored by the Department for Culture, Media and Sport. A DCMS spokesperson said: "The Government is aware that a number of sports bodies are in discussion with the betting industry and supports the efforts they are making to forge voluntary arrangements to address this issue. The Gambling Commission continues to regulate gambling in this country and has extensive powers. The Government will continue to monitor this issue."

When asked why high-risk bets are not banned or more strictly regulated the spokesperson said: "The Gambling Commission are best placed to answer this."

The Gambling Commission's position is that "bookmakers already risk-assess all bets offered and scrutinize all bets that pose any form of risk." The Commission says "it would not be be appropriate to restrict the categories of betting opportunity".

One problem for the government in seeking to impose stricter legislation is the fear that gambling firms will move offshore. This creates two problems: first that the industry moves out of the jurisdiction of legislation and second that the government risks losing lucrative revenue streams.

In a report sent to the Gambling Commission last August, the coalition warned the government against complacency. It cited examples of scandals few believed would happen, including examples in cricket (Hansie Cronje) and Italian football (the Serie A scandal).

The coalition said: "It is complacent to assume that incidents that have occurred overseas will not be replicated in the UK... we must remain vigilant to ensure similar incidents of this scale do not attack British sport."

Labels: , , ,

©2007 Richard Marcus
All Rights Reserved
Small Business Website Design by
Aldebaran Website Design, Seattle WA