Preventing miners from using unethically-sourced compute power is a different problem. I'm sure plenty of people will have a problem with it, but I don't see any way to solve it. If you know a way to distinguish botnets (once they are properly supporting the blockchain) from ethical miners, let us know.
Preventing is undoable and probably not even desirable. unethically-sourced is pretty vague, and its a thin line between a bot net, a borrowed, or rented PC.
However I wonder if there is a way we could help identify the victims of a bitcoin botnet somehow. It may not be "bitcoin's job", but I also see no reason why we would not want to help law enforcement and AV companies to identify and take down these botnets. It would be good for bitcoin, and for the victims of these botnets.
I know luke published a patch that logs the IP of the relaying node, so that could be used to home in on the proxy being used to relay these blocks. Thats not a bad idea, but will probably not do a whole lot, as he switches proxies every few weeks. And its just a relaying proxy anyway, and most likely not the C&C node. Perhaps someone can think of a way to take it a step further to positively identify the IP of the machine that actually mined the bloc by somehow including it in the blockchain? Or of the machine that created the getworks ?
Just thinking out loud here.