| 6 | |
| 7 | class Settings(): |
| 8 | def __init__(self, project_name: str = "default"): |
| 9 | self.project_name: str = project_name |
| 10 | self.project_comment: str = "" |
| 11 | self.project_path: FilePath = FilePath("{}{}/".format(PATH_WEB_PROJECT, self.project_name)) |
| 12 | |
| 13 | # OUT: Project directories and files (based on project_path) |
| 14 | self.project_c_path: FilePath = FilePath(self.project_path + "main.c") |
| 15 | self.project_asm_path: FilePath = FilePath(self.project_path + "main.asm") |
| 16 | self.project_exe_path: FilePath = FilePath(self.project_path + "main.exe") |
| 17 | self.project_shc_path: FilePath = FilePath(self.project_path + "main.bin") |
| 18 | |
| 19 | # IN: Injectable (like "7z.exe", in data/input/injectables/) |
| 20 | self.injectable_base: str = "" |
| 21 | # IN: Payload / Shellcode (like "createfile.bin", in data/input/shellcodes/) |
| 22 | self.payload_base: str = "" |
| 23 | |
| 24 | # Config |
| 25 | self.carrier_name: str = "" |
| 26 | self.carrier_invoke_style: CarrierInvokeStyle = CarrierInvokeStyle.BackdoorFunc |
| 27 | self.decoder_style: str = "xor_2" |
| 28 | self.payload_location: PayloadLocation = PayloadLocation.DATA |
| 29 | self.short_call_patching: bool = False |
| 30 | self.fix_missing_iat = True |
| 31 | self.patch_show_window = True |
| 32 | self.dllfunc: str = "" # For DLL injection |
| 33 | |
| 34 | # PLUGIN: Guardrail |
| 35 | self.plugin_guardrail: str = "none" |
| 36 | self.plugin_guardrail_data_key: str = "" |
| 37 | self.plugin_guardrail_data_value: str = "" |
| 38 | |
| 39 | # PLUGIN: Anti-Emulation / EDR deconditioner |
| 40 | self.plugin_antiemulation: str = "none" |
| 41 | self.sir_iteration_count: int = 5 |
| 42 | self.sir_alloc_count: int = 100 |
| 43 | |
| 44 | # PLUGIN: Other (not widely used or important) |
| 45 | self.plugin_virtualprotect: str = "standard" |
| 46 | self.plugin_virtualprotect_data: str = "" |
| 47 | self.plugin_decoy: str = "none" |
| 48 | |
| 49 | # DEBUG: Debug stuff (for development) |
| 50 | self.show_command_output: bool = False |
| 51 | self.verify: bool = False |
| 52 | self.try_start_final_infected_exe: bool = False |
| 53 | self.cleanup_files_on_start: bool = True |
| 54 | self.cleanup_files_on_exit: bool = True |
| 55 | self.generate_asm_from_c: bool = True |
| 56 | |
| 57 | def get_payload_path(self) -> FilePath: |
| 58 | if self.payload_base == "": |