refactor: rename central data structures

This commit is contained in:
Dobin
2024-04-07 11:34:13 +01:00
parent de73d5452e
commit a03c267070
12 changed files with 66 additions and 126 deletions
+4 -12
View File
@@ -23,33 +23,25 @@ PATH_WEB_PROJECT = "projects/"
# Correlated with real template files
# in data/plugins/
class AllocStyle(Enum):
RWX = "rwx_1"
#RW_X = "rw_x"
#REUSE = "reuse"
class DecoderStyle(Enum):
PLAIN_1 = "plain_1"
XOR_1 = "xor_1"
class ExecStyle(Enum):
CALL = "direct_1"
#JMP = "jump",
#FIBER = "fiber",
class DataRefStyle(Enum):
APPEND = 1
class InjectStyle(Enum):
class CarrierInvokeStyle(Enum):
ChangeEntryPoint = "change AddressOfEntryPoint"
BackdoorCallInstr = "hijack branching instruction in entrypoint"
class SourceStyle(Enum):
class FunctionInvokeStyle(Enum):
peb_walk = "peb_walk"
iat_reuse = "iat_reuse"
class PeRelocEntry():
def __init__(self, rva: int, base_rva: int, type: str):
+2 -4
View File
@@ -9,15 +9,13 @@ class Settings():
self.payload_path: FilePath = ""
# Settings
self.source_style: SourceStyle = SourceStyle.peb_walk
self.alloc_style: AllocStyle = AllocStyle.RWX
self.exec_style: ExecStyle = ExecStyle.CALL
self.source_style: FunctionInvokeStyle = FunctionInvokeStyle.peb_walk
self.decoder_style: DecoderStyle = DecoderStyle.XOR_1
self.dataref_style: DataRefStyle = DataRefStyle.APPEND
self.short_call_patching: bool = False
# Injectable
self.inject_mode: InjectStyle = InjectStyle.BackdoorCallInstr
self.carrier_invoke_style: CarrierInvokeStyle = CarrierInvokeStyle.BackdoorCallInstr
self.inject_exe_in: FilePath = ""
self.inject_exe_out: FilePath = ""