I'd expect the old insecure joomla install was the original source of the infection, the cron was just there to automatically re-infect it without the attacker needing to run the same remote exploit repeatedly
Re:Malware installed by Cron job
by eponeponepon on Thursday January 16, 2014 @08:00AM
(#7069090)
Presumably PHP itself, no? Assuming it was running with a few too many permissions, or even under root...
Also, if cron infected the PHP files I wonder what infected the crontab. :\