How do I detect them?

Just try to think as an attacker.

They want their contents to be indexed by search engines. So, monitoring the result that search engines provide for your sites is a good starting point.

When you find a suspicious result, try to download it. Then try using the search engine robot user agent. And try using the serach engine page URL as Referer. And analyze the responses.

But beware: This pages may contain malware or redirect you to sites that do so. You shoul use tools like "curl" that allows you to see the code without executing scripts or other active elements.

And, of course, monitor your logs, run antimalware software, keep track of file permissions, dates, versions and contents, check the names defined in your DNS, and do whatever you can to make your systems as secure as possible.

Next: If I was a victim...