I had a student recently who reported seeing ads in strange places when they were on our Moodle site. They were the only student reporting the issue so we did not believe that it was a hijacked pixel or issue with our site. It turns out that they had installed a bad extension on Firefox (though similar extensions for Safari and Chrome also exist).
To solve it we provided the student (a Firefox user) this tutorial which did the trick. https://support.mozilla.org/en-US/questions/959400