I believe that this is how the attack was done: After the 2011 hack of the forum, the attacker inserted some backdoors. These were removed by Mark Karpelles in his post-hack code audit, but a short time later, the attacker used the password hashes he obtained from the database in order to take control of an admin account and insert the backdoors back in. (There is a flaw in stock SMF allowing you to login as someone using only their password hash. No bruteforcing is required. This was fixed on this forum when the password system was overhauled over a year ago.) The backdoors were in obscure locations, so they weren't noticed until I did a complete code audit yesterday.
Because the backdoors were first planted in late 2011, the database could have been secretly accessed any time since then.
Welcome back forum!
Login with only the hash? That basically allows any admin to impersonate another user. How could SMF think that was a good idea??
I think it unlikely that if there was a two-year backdoor, it was placed by the recent defacer. It was most likely used by someone with the discipline to occasionally do a db pull and crack a hash and bring back an old account from the dead for scamming, or employ re-used passwords to make bitcoins mysteriously disappear from an exchange. It also could be used in a way that would never be learned, such as to retrieve IP addresses logs of a suspect account and use account information against a user, while "parallel construction" prevents any revelation of the backdoor.
My last post on this forum before it went down, about a rooted Bitcoin casino. How novel:
You are lucky that the hacker couldn't think of anything interesting to do; however that machine is not 100% secure unless it can be image-restored or reloaded. An intrusion detection system would have alerted to any system changes or the downtime. The hacker's goal may not have been to steal Bitcoins, it may have been to discover the site owner's identity or that of players or to log credentials.