
Sicherheitsanalyse von CVE-2024-3094 (XZ Utils Hintertür) einschließlich Bedrohungsmodellierung, statischer/dynamischer Code-Analyse, Fuzzing mit AFL++ und einem Proof-of-Concept-Exploit. Enthält Docker-Umgebung für reproduzierbare Analyse.
Autor: Ivan Sushin
Datum: März 2026
Dieses Repository enthält die Ergebnisse einer vollständigen Sicherheitsüberprüfung der Schwachstelle CVE-2024-3094 (Supply-Chain-Angriff in der Bibliothek XZ Utils).
Ziel der Arbeit:
Artefakte:
| Datei | Beschreibung |
|---|---|
docs/ThreatModel.md | STRIDE-Bedrohungsmodell + Diagramm |
docs/Report_Final.pdf | Abschlussbericht (57+ Seiten) |
exploit/PoC.py | Proof-of-Concept der Schwachstelle |
tests/ | Testpaket (pytest) |
reports/Findings.xlsx | Tabelle der Ergebnisse des Security Reviews |
presentation/ | Folien und Präsentationsvideo |
cd kaspersky_task_SushinIvan
# Image erstellen
docker build -t cveanalysis:1.0 .
# Image überprüfen
docker images | grep cveanalysis
# Container starten
docker run -it --rm --privileged -v $(pwd):/work cveanalysis:1.0
cd /work/src/vulnerable-code/build
# Cache bereinigen
rm -rf CMakeCache.txt CMakeFiles/
# Konfiguration
cmake .. -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Debug \
-DUSE_ATTR_IFUNC=OFF -DENABLE_NLS=OFF
# Kompilierung
make -j$(nproc)
# Version überprüfen
./xz --version
# Erwartete Ausgabe: xz (XZ Utils) 5.6.1
cd /work/src/patched-code/build
# Cache bereinigen
rm -rf CMakeCache.txt CMakeFiles/
# Konfiguration
cmake .. -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Debug \
-DUSE_ATTR_IFUNC=OFF -DENABLE_NLS=OFF
# Kompilierung
make -j$(nproc)
# Version überprüfen
./xz --version
# Erwartete Ausgabe: xz (XZ Utils) 5.6.2
cd /work/src/vulnerable-code/build
# Kompilierung
make -j$(nproc)
# Projekt-Tests ausführen
make test
# Erwartetes Ergebnis: All tests passed
# Abhängigkeiten installieren
cd /work
pip3 install -r tests/requirements.txt
# pytest ausführen
python3 -m pytest tests/ -v
Erwartetes Ergebnis: 5 passed
Statische Analyse
# Symbolanalyse (nm)
nm -C liblzma.a | grep -iE "ssh|backdoor|hook|init"
# Cppcheck
cppcheck --enable=all --inconclusive src/liblzma 2> reports/cppcheck_log.txt
Dynamische Analyse
# AddressSanitizer (Build mit Flags)
cmake .. -DCMAKE_C_FLAGS="-fsanitize=address -g"
# Valgrind
valgrind --leak-check=full ./exploit/test_trigger
# AFL++ Fuzzing (30 Minuten)
timeout 1800 afl-fuzz -i fuzzing/inputs -o fuzzing/outputs -- ./exploit/test_trigger_afl @@
.
├── Dockerfile # Docker-Image
├── README.md # Diese Datei
├── Report_Final.pdf # Abschlussbericht
├── docs/
│ ├── ThreatModel.md # Bedrohungsmodell
│ └── threat_model.png # Diagramm
├── exploit/
│ ├── PoC.py # Proof-of-Concept
│ ├── test_trigger.c # Test für ASAN/AFL++
│ ├── test_trigger # Binärdatei
│ └── test_trigger_afl # Instrumentierte Binärdatei
├── tests/
│ ├── src/
│ │ └── test_cve2024_3094.py # Automatisierte Tests
│ ├── CMakeLists.txt # Testkonfiguration
│ └── requirements.txt # Python-Abhängigkeiten
├── reports/
│ ├── Findings.xlsx # Ergebnistabelle
│ ├── asan_test_output.txt # ASAN-Logs
│ ├── valgrind_log.txt # Valgrind-Logs
│ ├── cppcheck_log.txt # Cppcheck-Logs
│ ├── afl_fuzzing_log.txt # AFL++-Logs
│ └── version_*.txt # Build-Versionen
└── presentation/
└── slides.md # Präsentationsfolien
| Komponente | Version | Verwendungszweck |
|---|
| Docker Engine | 20.10+ | Containerisierung der Umgebung |
| Git | 2.20+ | Versionskontrolle |
| Python | 3.8+ | Tests und Skripte |
| GCC/Clang | 9.0+ | Kompilierung von XZ Utils |