mirror of
https://github.com/dobin/SuperMega
synced 2026-06-03 01:27:11 +00:00
feature: copy to out/ at the end
This commit is contained in:
@@ -162,7 +162,8 @@ def obfuscate_shc_loader(file_shc_in, file_shc_out):
|
|||||||
print("Error")
|
print("Error")
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
print(" > Generated main-clean-sgn.bin")
|
print(" > Success obfuscation")
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
def test_shellcode(shc_name):
|
def test_shellcode(shc_name):
|
||||||
@@ -191,8 +192,10 @@ def verify_shellcode(shc_name):
|
|||||||
# better to remove it immediately. If cleanup on start is not performed,
|
# better to remove it immediately. If cleanup on start is not performed,
|
||||||
# there may be false positives
|
# there may be false positives
|
||||||
os.remove(verify_filename)
|
os.remove(verify_filename)
|
||||||
|
return True
|
||||||
else:
|
else:
|
||||||
print("---> Verify FAIL. Payload did not create file.")
|
print("---> Verify FAIL. Payload did not create file.")
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
def inject_exe(shc_file, exe_in, exe_out):
|
def inject_exe(shc_file, exe_in, exe_out):
|
||||||
|
|||||||
+5
-1
@@ -58,7 +58,7 @@ options_verify = {
|
|||||||
|
|
||||||
"inject_exe": True,
|
"inject_exe": True,
|
||||||
"inject_exe_in": "exes/procexp64.exe",
|
"inject_exe_in": "exes/procexp64.exe",
|
||||||
"inject_exe_out": "exes/procexp64-a.exe",
|
"inject_exe_out": "out/procexp64-a.exe",
|
||||||
|
|
||||||
"alloc_style": AllocStyle.RWX,
|
"alloc_style": AllocStyle.RWX,
|
||||||
"exec_style": ExecStyle.CALL,
|
"exec_style": ExecStyle.CALL,
|
||||||
@@ -121,6 +121,10 @@ def main():
|
|||||||
print("--[ Test Append shellcode ]")
|
print("--[ Test Append shellcode ]")
|
||||||
test_shellcode("main-clean-append.bin")
|
test_shellcode("main-clean-append.bin")
|
||||||
|
|
||||||
|
# copy it to out
|
||||||
|
shutil.copyfile("main-clean-append.bin", os.path.join("out/", "main-clean-append.bin"))
|
||||||
|
|
||||||
|
|
||||||
if options["inject_exe"]:
|
if options["inject_exe"]:
|
||||||
inject_exe("main-clean-append.bin", options["inject_exe_in"], options["inject_exe_out"])
|
inject_exe("main-clean-append.bin", options["inject_exe_in"], options["inject_exe_out"])
|
||||||
if options["verify"]:
|
if options["verify"]:
|
||||||
|
|||||||
Reference in New Issue
Block a user