By default most compromised servers have all functions like fsock ,socket_create and all disabled,To overcome this we can use the method of transferring data using session sharing.
I have written a tool to work in almost all compromised servers running PHP having disabled PHP functions like the mentioned above having encryption and all, but it ain't developed as Tunna is, ;-) (I am working on it adding aspx and all....) If you are able to get inspiration from it ,It would greatly help in the growth of this tool.
Tool: https://github.com/thesunRider/firedrill