diff --git a/config.yaml b/config.yaml index c264ac1..e9f2290 100644 --- a/config.yaml +++ b/config.yaml @@ -5,3 +5,4 @@ path_masmshc: 'C:\Users\hacker\Source\Repos\masm_shc\out\build\x64-Debug\masm_s path_runshc: 'C:\Users\hacker\Source\Repos\masm_shc\out\build\x64-Debug\runshc\runshc.exe' #- path_shexec = r'C:\Research\hasherezade\exec_fiber\sh-exec-fiber.exe' +path_sgn: 'C:\tools\sgn2.1\sgn.exe' \ No newline at end of file diff --git a/supermega.py b/supermega.py index dfcbe28..8293f48 100644 --- a/supermega.py +++ b/supermega.py @@ -265,22 +265,12 @@ def start(project: Project): def obfuscate_shc_loader(file_shc_in, file_shc_out): logger.info("--[ Obfuscate shellcode with SGN") - if True: - path_sgn = r'C:\tools\sgn2.0\sgn.exe' - run_process_checkret([ - path_sgn, - "-a", "64", - "{}".format(file_shc_in), - ], check=True) - #shutil.copy(file_shc_in + ".sgn", file_shc_out) - else: - path_sgn = r'C:\training\tools\sgn\sgn.exe' - run_process_checkret([ - path_sgn, - "--arch=64", - "-i", "{}".format(file_shc_in), - "-o", "{}".format(file_shc_out), - ], check=True) + run_process_checkret([ + config.get("path_sgn"), + "--arch=64", + "-i", "{}".format(file_shc_in), + "-o", "{}".format(file_shc_out), + ], check=True) if not os.path.isfile(file_shc_out): logger.info("Error") return