It is unclear which group was behind the attack and what was their motive, but the exploit kit used shows similarities with the one used in infection of php.net in October 2013.Yahoo have already Confirmed they have removed the infected ads which where sharing Malware, and will be Monitoring any such ads in the future.

Yahoo ad Network struck by Malware  thousands of ads visitor infected    TechWorm - 98