Let's say that a partner wants to upload a PHP script to my Apache server. What kind of mayhem could be caused by this?
Which PHP parameters pose threats? If those PHP parameters are fully disabled, would allowing PHP to be inserted on my servers then be safe?
These are some PHP parameters that I know of that pose a security flaw. What others are there that are unsafe?
Writing to server:
fwrite
file_get_contents
FILE_APPEND
Opening files on server:
fopen
file_get_contents
include
fread
url_get_contents
curl_init
curl_setopt
Deleting files:
- unlink
- unset
Are there any other security flaws that I should be thinking about before allowing partners to add .php files onto my server? I imagine that there might be a lot that I'm unaware of.
I'm also worried about loop scripts that could use up all of my RAM and CPU, backdoor access attacks, malware and the like. Are there any measures that I can take to prevent any of that and more from happening?
If there is Javascript, JQuery or other languages embedded in the PHP script, are those dangerous as well? And what kind of parameters in other languages would I need to disable in order to protect my server?
How do websites like jsfiddle and codepen keep their sites secure while allowing people to post their own code?