Skip to content

Commit

Permalink
add second solve function to moqhao
Browse files Browse the repository at this point in the history
sample b044804cf731cd7dd79000b7c6abce7b642402b275c1eb25712607fc1e5e3d2b
  • Loading branch information
eybisi committed Feb 14, 2024
1 parent 6e16cdb commit c9a217c
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/kavanoz/loader/moqhao.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ def brute_assets(self):
self.logger.info(
f"Decryption finished! {self.decrypted_payload_path}"
)
else:
if self.solve_encryption_native(f):
self.logger.info(
f"Decryption finished! {self.decrypted_payload_path}"
)

def lazy_check(self, apk_obj, dvms) -> bool:
file_list = apk_obj.get_files()
Expand All @@ -45,4 +50,14 @@ def solve_encryption(self, file_data):
return True
else:
return False
return False

def solve_encryption_native(self, file_data):
if len(file_data) < 24:
return
first_12 = file_data[:24]
xor_key = first_12[16].to_bytes(1, "little")
xord_data = xor(file_data[24:], xor_key)
if self.check_and_write_file(xord_data):
return True
else:
return False

0 comments on commit c9a217c

Please sign in to comment.