After everything what I did in order to protect my server, i have uploaded webshell (WSO 2.1 Web Shell) , to see how far can hacker go and gues what, I was shocked, because I was able to read very sensitive information.
I can run number of commands and read a lot of private data.
As you can see from source code of webshell... and that's not all you can do, but there is more...
If permissions are not as it should be, then it's possible to read the content of those files.
So question is simple, what can I do in order to protect my server, how can I limit/restrict shell command execution via PHP.
What are recommended permissions for:
/bin /sbin /usr/bin /usr/sbin
I also did all of this. (Hardening PHP from php.ini)
EDIT: I'v missed popen from disabled PHP functions. That solved my problem!