Skip to content
KitploitKITPLOIT
StrumentiBlog
Invia
StrumentiBlog
Invia

Strumenti di Hacking, PenTest e Cybersecurity per il tuo Arsenale di Sicurezza!

Kitploit è una directory di strumenti di hacking, cybersecurity e pentesting. Scopri gli ultimi aggiornamenti dei progetti per trovare vulnerabilità, analizzare sistemi, automatizzare i test e rafforzare la tua sicurezza.

··Feed·Contatto·Privacy·© 2026 Kitploit

Directory degli strumenti

Categorie

Vedi tutte le categorie
Loading categories
CVE-2026-9999-Serverless-Event-Injection-to-Code-Overwrite — Exploit proof-of-concept per CVE-2026-9999, che dimostra il path traversal negli eventi di object storage serverless, i quali sovrascrivono il codice sorgente delle funzioni per ottenere RCE. | Kitploit
Strumenti/GitHubGitHub/george0papasotiriou/cve-2026-9999-serverless-event-injection-to-code-overwrite
Sicurezza dell'Infrastruttura CloudAnalisi delle VulnerabilitàExploitSicurezza ServerlessSicurezza CloudApprendimento e Formazione
GitHubgeorge0papasotiriou/cve-2026-9999-serverless-event-injection-to-code-overwrite

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

Exploit proof-of-concept per CVE-2026-9999, che dimostra il path traversal negli eventi di object storage serverless, i quali sovrascrivono il codice sorgente delle funzioni per ottenere RCE.

Vedi Repository
101 mese faNon ancora revisionato

Più Popolari

Vedi tutti →

Scopri gli strumenti più utilizzati dalla nostra community.

Esplora tutti gli strumenti

Sfoglia la nostra collezione di strumenti

Vedi tutti gli strumenti →
Condividi

3. CVE-2026-9999 – Iniezione di eventi in funzioni serverless (Path Traversal → Sovrascrittura del codice)

Panoramica

Una piattaforma serverless che elabora eventi di object storage non sanitizza il campo object.key, consentendo a un attaccante di sovrascrivere il codice sorgente della funzione tramite path traversal.

Gravità: Critica (RCE alla successiva invocazione)

Exploit e simulazione (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 – Iniezione di eventi serverless per la sovrascrittura del codice

Severity: Critical

📖 Panoramica

Una vulnerabilità di path traversal nell'elaborazione degli eventi di una piattaforma serverless consente a un attaccante di sovrascrivere il codice sorgente della funzione, portando all'esecuzione remota di codice nelle invocazioni successive.

⚙️ Dettagli della vulnerabilità

  • Tipo: Path Traversal / Scrittura di file non sicura
  • Impatto: Esecuzione remota di codice (RCE)
  • Causa principale: La piattaforma considera attendibile il campo object.key degli eventi di storage senza sanitizzazione, consentendo a sequenze ../ di scrivere in percorsi arbitrari all'interno della sandbox della funzione.

🧪 Dimostrazione dell'exploit

  1. Avvia il runtime vulnerabile:
    root@kitploit:~
    python vulnerable_serverless.py
    
  2. Esegui l'exploit:
    root@kitploit:~
    python exploit_event_injection.py
    
Scarica lo strumento