4 ms·
Believe it or not, this code would be just as bad even if the `eval` call was removed entirely. See: http://www.reddit.com/r/netsec/comments/1k1875/open_source
by meowface 13y ago
Believe it or not, this code would be just as bad even if the `eval` call was removed entirely. See:
http://www.reddit.com/r/netsec/comments/1k1875/open_source_backdoor_copyrighted_under_gnu_gpl/cbkjgzj http://www.reddit.com/r/netsec/comments/1k1875/open_source_b...
I'm not sure if Suhosin also prevents implicit evals of that nature; it very well may. And if it doesn't, this code could effectively be neutralized if only harmless functions could be called (though it'd be hard to guarantee such a thing).
- eksith 13y agoWow! That's just... nuts! I had no idea that PHP had such a completely insecure inclusion vulnerability. I'm not sure if Suhosin protects against these, but the feature list does mention limits on request variables : http://www.hardened-php.net/suhosin/a_feature_list.html http://www.hardened-php.net/suhosin/a_feature_list.html As always, yes, it's very difficult to guarantee only harmless functions are called. One of the simplest ways would be to prevent execution of code in the web root directory. Usually, we put the code files outside www and disable file uploads (separate instance for that which will exclusively handle PUT requests).
- meowface 13y agoTo be fair, it's probably not a security vulnerability in most cases, because it's rare that serious code does the equivalent of `$func = $_GET['func']; $func($_GET['userinput']);`, but it certainly makes for nice backdooring. Regardless, PHP in general was never designed for security of any sort.