Hackers use JavaScript injections to redirect visitors to specific websites to collect affiliate referrals.