I've done this with my local HOST file and its only moderately effective. The problem is that 127.0.0.1 never replies and the timeout period causes the page load to stall.
If I knew how I'd redirect requests to a local IP running a webserver that replies 410-Gone, 202-Accepted, 200-OK (or whatever code necessary) to any and all requests so the requesting page moves on and doesn't stall. If I was even more talented I could set up a public webserver and share it with the world so we could all point to it and block these ad servers that are ruining the internet.
NB: I'm not opposed to ads but the marketers need to realize the WWW is not TV and stop forcing unwanted, irritating and obnoxious ads and auto-play videos.