I'm going crazy trying to figure out this hack. I have reinstalled clean installs of WP, and my theme (after making sure it was clean), and the plugins I was using.
NOTHING seems to be working.
Last week, I deactivated all of my plugins and found the problem to go away, so I thought it was one of the plugins.
Today, I deactivated all my plugins and I am still experiencing the problem.
It has something to do with a custom permanlink structure of /%category%/%postname%.
When I remove the custom structure, the problem goes away.
A friend of mine had noted that someone (something) had been shelling into my account until April 16 when it stopped. He saw that in my error logs. It primarily tried to run procedures in wp-admin/index.php but failed. We don't know what succeeded.
I have installed and reinstalled clean installs, I don't know what to make of the whole thing.
When I reactivated the permalinks, the problem appears again. (It is deactivated now.) But I have placed code here so it can be analyzed.
When you clink on a permalink, it will take you off site to a page with an iframe:
The iframe is filled with this code: