feature: xor encoding of payload with changeable key

This commit is contained in:
Dobin
2024-02-20 18:19:00 +00:00
parent 795227f60e
commit 23ca683360
5 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ def merge_loader_payload(
# Nothing to do
pass
elif decoder_style == DecoderStyle.XOR_1:
xor_key = 0x42
xor_key = config.xor_key
logger.info("---[ XOR payload with key 0x{:x}".format(xor_key))
payload_data = bytes([byte ^ xor_key for byte in payload_data])
+1
View File
@@ -45,6 +45,7 @@ def create_c_from_template(
plugin_decoder = file.read()
plugin_decoder = Template(plugin_decoder).render({
'PAYLOAD_LEN': payload_len,
'XOR_KEY': config.xor_key,
})
filepath = "plugins/executor/{}.c".format(exec_style.value)