Code:
Code:
function file_extension($filename)
{
return end(explode(".", $filename));
}So now to exploit it, we could go about this several ways, the easiest would to add two extension names,
Code:
"lolnotashell.jpg.php"
The code above will only strip the text to the first "." and it will see .jpg.php but it wont check for the .php part which is the real file extension so basically .jpg is a ghost extension name
Another way to exploit an avatar image upload system is to use null meta-characters such as "" this will make sure that the system doesn't automatically add a new extension name like .jpg or .gif.
Code:
"lolnotashell..php.jpg" either that or "lolnotashell.php.jpg"
No comments:
Post a Comment