A world-writable file or folder is a common cause of a hacked site. It is easy to look for.
find /var/www -perm /o+w ! -type l
With a slash, -perm /o+w matches when any of the listed bits is set, here the write bit for others. Without the slash, a dash means all listed bits must be set, and a plain mode means an exact match. Symlinks are always 777, so ! -type l removes the noise. Folders with the sticky bit, like /tmp, are meant to be writable.
Further reading: find manual page