So a quick update on the hash-hijacking (best name I can come up with).
Sorry I wasn't more active on here (thanks comeon for relaying a ton of info), we we furiously trying to find what was causing the issue on IRC, and things were fast moving enough that if I would take the time to post it here, it wouldn't be relevant 3 minutes later.
Things we're confident it isn't:
1) DNS. Theres no reason to suspect it was a DNS hijack at all. It happened to multiple pools (us, multipool), and we don't host DNS at the same locations.
2) Hacked Server / Injected code. Code running in production was diff'd against our daily backups, and nothing changed. Plus, stratum code had not been restarted since I did it manually (times line up). Also, this affected Multipool, and we don't run the same code
Things it could still be:
1) Miner malware. It hits too many different configurations (OS's, miner versions, etc) to be in the miner itself. Perhaps a bad wallet or something, but to accomplish what they're doing, it would need to be injecting packets into your TCP stack, which while possible, is unlikely.
What we think it is:
Our best guess at the current time is a MITM attack somewhere on the internet. Because it is in a specific location, they would only be rerouting certain segments of traffic, not everyone, which lines up with what we're seeing. This could either be done at the DNS level for those specific users, or at the BGP level (less likely). What would happen in this case is that mining traffic from users affected would go _through_ this other user's IP before being relayed to WP. He would let you associate and start mining, and at some point, inject a single packet into the stream that says "redirect your miner to this other address". At which point your miner would listen and redirect to his address and start mining there.
The reason this is the most likely event is due to how we're seeing users switch pools. This shows in logs:
[01:04:46] Reconnect requested from Waffle [WEST] to 206.223.224.225:3009
Which is the logline you'd see if a pool sent a "client.reconnect" message, and the user sees themselves connected to a different pool afterwards.
Our stratum server _never_ sends this line (we've never used the "client.reconnect" message, don't have any use for it), which makes it seem like it is being injected by a 3rd party somewhere along the way. Also the fact that this is happening to Multipool is a good indicator that its network related (somewhere in the network between WP and the end user).
As for how to combat it, it really depends on how they're becoming the middlepoint, which we don't know yet. Both Multipool and us have endpoints in the same datacenters, so it is possible that its something at the host, but seems a bit unlikely due to it only affecting some users, and that subset of users isn't a changing group for the most part (its not a random 1%, its a selected group).
At this point, we're still just digging, and don't have any more information that isn't posted here. We're still looking into it, and we have a ton of people watching packet captures to get more information. Sorry I don't know more...