I'm really thankful I haven't yet had a job where all I'm developing is new ways to force people to see ads. Imagine working on a 'feature' like this for weeks or months, and the end result is simply that people who don't want to see ads now have to see ads.
Ethics aside, this actually sounds kind of fun to me. It's the kind of clever puzzle solving many of us love about programming - it's basically a cat and mouse game.
I'm sure there were a lot of interesting challenges creating the V2 rocket that terrorized London...
Not wanting to turn into a Nazi apologist but to play devil's advocate for a minute, that very same research put people in space as well as creating our current communications infrastructure.