2.0 任意文件删除漏洞

暗月博客 2019年11月21日15:36:38评论420 views字数 972阅读3分14秒阅读模式
摘要

微博求关注啊   http://1.t.qq.com/x0h4ck3r

其实一整套系统盲注挺多的.....不过他有个防注入的代码...有点蛋疼

我就直接贴代码吧

转摘请注意署名(转摘不署名的烂JJ,全家的JJ都烂掉)   http://hi.baidu.com/sethc5     西毒

微博求关注啊   http://1.t.qq.com/x0h4ck3r

function onsaveimg() {     $x1 = $this->post['x1'];     $y1 = $this->post['y1'];     $x2 = $this->post['x2'];     $y2 = $this->post['y2'];     $w = $this->post['w'];     $h = $this->post['h'];     $ext = $this->post['ext'];//echo $ext.'xxx';exit();     $upload_tmp_file = TIPASK_ROOT . "/data/tmp/" . 'bigavatar' . $this->user['uid'] . $ext;     $avatardir = "/data/avatar/"; //图片存放目录     $scale = 100 / $w;     resizeThumbnailImage($smallimg, $upload_tmp_file, $w, $h, $x1, $y1, $scale);     copy($upload_tmp_file, TIPASK_ROOT . $dir3 . '/big_' . $uid . $ext);     is_file($upload_tmp_file) && unlink($upload_tmp_file);     $_ENV['user']->update_avatar($smallimg);     $this->message('头像设置成功!', 'user/editimg'); }

大家看这里的代码

这里的$ext是post过来的,然后传给了$upload_tmp_file ,到这里的时候is_file($upload_tmp_file) && unlink($upload_tmp_file);

当存在这个文件就删除他...

所以你懂了,如果我们删除锁定安装的install.lock就可以重新安装了。

这里重新安装之后,后来拿shell有点鸡肋....所以就放出来了.

转摘请注意署名(转摘不署名的烂JJ,全家的JJ都烂掉)   http://hi.baidu.com/sethc5    西毒

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
暗月博客
  • 本文由 发表于 2019年11月21日15:36:38
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   2.0 任意文件删除漏洞https://cn-sec.com/archives/70799.html

发表评论

匿名网友 填写信息