From 5d51b4fe0bb41bc9e86c5775de35a9aef023fec5 Mon Sep 17 00:00:00 2001 From: Theofilos Augoustis Date: Mon, 27 Nov 2023 13:22:01 +0100 Subject: Implement symbolic state comparison algorithm This is the first draft of a `compare` algorithm that uses recorded symbolic transformations. Is currently based on angr, so it's probably going to be reworked to work with states generated by Miasm. Co-authored-by: Theofilos Augoustis Co-authored-by: Nicola Crivellin --- lldb_target.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lldb_target.py') diff --git a/lldb_target.py b/lldb_target.py index 5477ab7..dd0d543 100644 --- a/lldb_target.py +++ b/lldb_target.py @@ -124,7 +124,7 @@ class LLDBConcreteTarget(ConcreteTarget): raise SimConcreteMemoryError(f'Error when writing to address' f' {hex(addr)}: {err}') - def get_mappings(self): + def get_mappings(self) -> list[MemoryMap]: mmap = [] region_list = self.process.GetMemoryRegions() @@ -134,11 +134,12 @@ class LLDBConcreteTarget(ConcreteTarget): perms = f'{"r" if region.IsReadable() else "-"}' \ f'{"w" if region.IsWritable() else "-"}' \ - f'{"x" if region.IsExecutable() else "-"}' \ + f'{"x" if region.IsExecutable() else "-"}' + name = region.GetName() mmap.append(MemoryMap(region.GetRegionBase(), region.GetRegionEnd(), - 0, # offset? - "", # name? + 0, # offset? + name if name is not None else '', perms)) return mmap -- cgit 1.4.1