the attack was most likely from the XML-RPC exploits in php packages, probably from old installation of Wordpress. And it used several Linux kernel exploits to gain root access. I have deleted all xmlrpc.php, please make sure the version you're restoring are free from exploits.
I have upgraded my kernel and there is no known kernel-level local/remote exploit now.
I also recommend changing your shell passwords.