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

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

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

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

工具目录

分类

查看所有分类
Loading categories
CVE-2026-9999-Serverless-Event-Injection-to-Code-Overwrite — 针对 CVE-2026-9999 的概念验证漏洞利用,演示了无服务器对象存储事件中的路径遍历漏洞,该漏洞会覆盖函数源代码以实现远程代码执行(RCE)。 | Kitploit
工具/GitHubGitHub/george0papasotiriou/cve-2026-9999-serverless-event-injection-to-code-overwrite
云基础设施安全漏洞分析漏洞利用无服务器安全云安全学习与教育
GitHubgeorge0papasotiriou/cve-2026-9999-serverless-event-injection-to-code-overwrite

CVE-2026-9999-Serverless-Event-Injection-to-Code-Overwrite

针对 CVE-2026-9999 的概念验证漏洞利用,演示了无服务器对象存储事件中的路径遍历漏洞,该漏洞会覆盖函数源代码以实现远程代码执行(RCE)。

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享
查看仓库
111个月前尚未审核

3. CVE-2026-9999 – 无服务器函数事件注入(路径遍历 → 代码覆盖)

概述

处理对象存储事件的无服务器平台未对 object.key 字段进行清理,从而允许攻击者通过路径遍历覆盖函数源代码。

严重性: 严重(下次调用时 RCE)

漏洞利用与模拟(Python)

root@kitploit:~
#!/usr/bin/env python3
"""
vulnerable_serverless.py - Simulated AWS Lambda-like runtime with event injection.
"""
import json, os, shutil, subprocess
from http.server import HTTPServer, BaseHTTPRequestHandler

FUNCTION_DIR = "/tmp/function"
os.makedirs(FUNCTION_DIR, exist_ok=True)
# initial function code
with open(os.path.join(FUNCTION_DIR, "handler.py"), "w") as f:
    f.write("""
def handler(event):
    return "Hello, " + event.get('name', 'world')
""")

class Handler(BaseHTTPRequestHandler):
    def do_POST(self):
        content_length = int(self.headers['Content-Length'])
        body = self.rfile.read(content_length)
        event = json.loads(body)
        # Vulnerable: use event['key'] to decide which file to load?
        # Simulate: the function source is overwritten by an "update" event from storage.
        if event.get('source') == 'storage':
            # Path traversal in object key
            object_key = event['object']['key']  # attacker controlled
            # Overwrite handler.py with the object content (simulated)
            dst = os.path.join(FUNCTION_DIR, "handler.py")
            # directory traversal to write outside? But we want to overwrite handler.py.
            # Attack: object.key = "../../../tmp/function/handler.py"
            # Normalize to ensure it's within FUNCTION_DIR? No validation!
            # The "get object" would fetch the file; here we just write injected code.
            injected_code = event.get('code', '# no code')
            # Resolve the full path – this is the vulnerability:
            full_path = os.path.normpath(os.path.join(FUNCTION_DIR, object_key))
            # Only check if it is under FUNCTION_DIR? Not present.
            with open(full_path, 'w') as f:
                f.write(injected_code)
            self.send_response(200)
            self.end_headers()
            self.wfile.write(b"Update applied")
        else:
            # Execute current handler (for demo)
            import handler
            result = handler.handler(event)
            self.send_response(200)
            self.end_headers()
            self.wfile.write(result.encode())

server = HTTPServer(('0.0.0.0', 8000), Handler)
server.serve_forever()

CVE-2026-9999 – 无服务器事件注入导致代码覆盖

Severity: Critical

📖 概述

无服务器平台事件处理中的路径遍历漏洞允许攻击者覆盖函数源代码,从而在后续调用中实现远程代码执行。

⚙️ 漏洞详情

  • 类型: 路径遍历 / 不安全文件写入
  • 影响: 远程代码执行(RCE)
  • 根本原因: 平台信任来自存储事件的 object.key 字段,而未进行清理,从而允许 ../ 序列在函数沙箱内写入任意路径。

🧪 漏洞利用演示

  1. 启动易受攻击的运行时:
    root@kitploit:~
    python vulnerable_serverless.py
    
  2. 运行漏洞利用程序:
    root@kitploit:~
    python exploit_event_injection.py
    
下载工具