4 ms·
>disabling eval doesn't buy you much: If you really want to execute code, write it to a file and then require that file. Eval is used by most attackers to avoi
by nivla 14y ago
>disabling eval doesn't buy you much: If you really want to execute code, write it to a file and then require that file.
Eval is used by most attackers to avoid detection. A one liner add to the end of a legitimate random php file along with extra padding to push it off the screen will make most users to miss it.
Creating directories and files not only requires appropriate permissions but is also more susceptible to be noticed by a user browsing through them.
- Xylakant 14y agoDo you really think anybody would have noticed a "include 'common/footer.php'" at the end of the file? If you have write access to the download tarball, all is lost. Disabling eval on the deploy machine doesn't buy you anything. In general: If you can write to any file in the deployed app, every bet is off - eval or not. Disabling eval helps you in cases where the legitimate code uses eval and can be tricked into passing code snippets of your choice to the call.