feature: upgrade to SGN 2.0.1

This commit is contained in:
Dobin
2024-02-22 21:17:21 +00:00
parent 7a9fb2da3b
commit 274cd01d30
2 changed files with 7 additions and 16 deletions
+1
View File
@@ -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_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_shexec = r'C:\Research\hasherezade\exec_fiber\sh-exec-fiber.exe'
path_sgn: 'C:\tools\sgn2.1\sgn.exe'
+6 -16
View File
@@ -265,22 +265,12 @@ def start(project: Project):
def obfuscate_shc_loader(file_shc_in, file_shc_out): def obfuscate_shc_loader(file_shc_in, file_shc_out):
logger.info("--[ Obfuscate shellcode with SGN") logger.info("--[ Obfuscate shellcode with SGN")
if True: run_process_checkret([
path_sgn = r'C:\tools\sgn2.0\sgn.exe' config.get("path_sgn"),
run_process_checkret([ "--arch=64",
path_sgn, "-i", "{}".format(file_shc_in),
"-a", "64", "-o", "{}".format(file_shc_out),
"{}".format(file_shc_in), ], check=True)
], 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)
if not os.path.isfile(file_shc_out): if not os.path.isfile(file_shc_out):
logger.info("Error") logger.info("Error")
return return