feature: inject into dll basic support

This commit is contained in:
Dobin
2024-04-07 13:15:55 +01:00
parent f9b5dc8346
commit a488cf1b17
8 changed files with 47 additions and 31 deletions
+13
View File
@@ -49,6 +49,19 @@ def clean_files(settings):
pathlib.Path(file).unlink(missing_ok=True)
def run_exe(exefile, check=True):
logger.info("--[ Start infected file: {}".format(exefile))
if exefile.endswith(".dll"):
args = [ "rundll32.exe", "{},BZ2_blockSort".format(exefile) ]
elif exefile.endswith(".exe"):
args = [ exefile ]
else:
raise Exception("Unknown file type: {}".format(exefile))
run_process_checkret(args, check=check)
def run_process_checkret(args, check=True):
ret = subprocess.CompletedProcess("", 666)
try: