Sucuri who are famous for their great security services came up with a Free WordPress plugin to help with cleaning up a hacked WordPress-powered web site:
Cleaning Up Your WordPress Site with the Free Sucuri Plugin
The plugin may not help mitigate consequences of every hack, but it offers a set of steps that are likely to show you where the problem is. It starts with the Sucuri’s free remote scanner, SiteCheck, and ends with resetting passwords and security keys and offers advise on further hardening your WordPress installation.