by:xhming
data/modules/albums/pages_admin/albums_getimage.php
....................................
$image = $_GET['image'];
if (!ereg("thumb", $image)) {
if (preg_match("#([.*])([/])([A-Za-z0-9.]{0,11})#", $image, $matches)) {
if ($image != $matches[0]) {
unset($image);
die("A hacking attempt has been detected. For security reasons, we're blocking any code execution.");
}
}
}
elseif (ereg("thumb", $image)) {
if (preg_match("#([.*])([/])thumb([/])([A-Za-z0-9.]{0,11})#", $image, $matches)) { //正则匹配有问题!!!
if ($image != $matches[0]) {
unset($image);
die("A hacking attempt has been detected. For security reasons, we're blocking any code execution.");
}
}
}
if (file_exists("../../../../data/settings/modules/albums/$image")) {
//generate the image, make sure it doesn't end up in the visitors buffer
header("Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0");
header("Expires: Thu, 19 Nov 1981 08:52:00 GMT");
header("Pragma: no-cache");
header("Content-Type: image/jpeg");
echo readfile("../../../../data/settings/modules/albums/$image"); //触发漏洞
很明显if (preg_match("#([.*])([/])thumb([/])([A-Za-z0-9.]{0,11})#", $image, $matches))这个正则试有问题,只要我们$image变量有thumb字符就可以绕过它的检测!
本地测试如图:
很多人看到这个话题都非常惊讶,或者他们可能认为这是一个花心的女人,因为他们认为女人的花心和男人的花心是一样的,但它的花心有本质的区别,因为一个男人可以再爱一个女人的同时,心里还在想着一些女人,但是女人...
特殊时期,想了很多关于的问题? 目前的手机生态,感觉是封闭的,每个人的手机,下载了,,来来往往,都是那几个APP,中小,没有技术,费用去开发IOS,apk,手机对技术的门槛越来越高。 而手机提供的内容...
作者:zodiacsoft 伟大的2009年就要过去了,在21世纪的头十年里,安全事业得到了长足的进步和发展,一大批vocal的黑客组织和山寨黑客组织在这十年内崛起、腾飞或 者消亡,无数的黑客或者山寨...
过去20年,定位咨询师和定位理论学习者,中国最多。 过去20年,定位咨询公司数量,中国最多。 过去20年,定位咨询案例,中国最多。 长期以来,定位只是一个广告概念,直到2...
私家侦探怎么凭手机号码进行定位的(真的什么信息都可以查到吗)专业盗取微信密码,开房查询,通话记录查询,查询微信聊天记录,非常靠谱!心理学家的研究发现,一个人不经意的动作常常暴露出他内心的一些想法,比如...
黑客教您获取其他微信密码方法来教您如何登录别人的微信!恋爱中没有感觉如何恢复?想知道两个人分手是有一定原因的,只有自己找到了分手的原因,所以赎回自己的这段爱情才能希望,今天花镇小化妆和你讨论如何无情无...