I know a guy who worked for an international gambling syndicate, primarily betting on horse races. According to him, they tried to get into online poker bots, but kept getting caught. It sounded like they were using groups of bots and collusion, which I think is how they were detected.
The last I saw the custom bots being run were buying up hand histories by the millions and using pre-flop agression and all the other factors to preform clustering. Then they clusters were used to choose a strategy.
Stars and FTP are both pretty good about finding bots. But poker bot writers are learning from game bot makers. They are pretty well protected on the client end. So as long as the bots have some variance they are really hard to spot. And a lot of the variance comes from choosing how to play the person who is betting. Though it looks like some bot writers have not been putting enough variance into their bots.
For a long time the big push was to find ways to make the input look like it came from a human. Moving the cursor to the exact middle of the button you want to push every time in <100ms is a dead give away. I don't really know if this was ever something that FTP and stars used though.
This seems intuitive, but it is actually false. The majority of "grinders" (mid-stakes players who multi-table 9-24 tables at a time for a living) use programs like autohotkey that actually do exactly this, allowing players to play with the keyboard and even console (e.g. PS3) controllers. The most popular poker sites explicitly allow those helper programs.
Poker sites can tell if the keyboard interrupt came from which usb id so that isn't really an option. Moving the mouse is much more likely not to have a way to see if the hardware caused it. Hence why it is used more often.
Having a single bot in a tournament is not bad per se, since they are easy to identify (they do not respond to player rage, they shove or call on hands that may be +EV isolated, but in tournament play are not, and they are the player who come final table sit all quiet and do not respond to deals) - the prob arises when bot networks join a single tournament and collude - especially on the double or nothing tournaments (where if you finish in the top half you get double your money, or nothing)
Stars and FTP are very agressive with combating the problem. I receive refunds all the time because of previous games that have been investigated, so it is great that other players can rely on their work (and it is good to login and find that you have extra money because they are doing their job). These sites are making a lot of money on rake but they are definitely re-investing it to protect the players. They have hired some of the best security guys in the world to work for them (I know one of them, he should do an AMA because it would be super interesting).