Not so much the ad server as the ad itself. Basically, code in the ad can go "if (thingsLookSafe) then doBadThing()". That means that when the ad server runs tests on it, it looks safe and well-behaved, but when it gets a shot it can act badly.
♥ 1