diff options
| author | Theofilos Augoustis <theofilos.augoustis@gmail.com> | 2023-11-27 13:22:01 +0100 |
|---|---|---|
| committer | Theofilos Augoustis <theofilos.augoustis@gmail.com> | 2023-11-27 13:22:01 +0100 |
| commit | 5d51b4fe0bb41bc9e86c5775de35a9aef023fec5 (patch) | |
| tree | 09d1f87c8a3964f72b71b7a04945a7f5e7e12abe /lldb_target.py | |
| parent | 47894bb5d2e425f28d992aee6331b89b85b2058d (diff) | |
| download | focaccia-5d51b4fe0bb41bc9e86c5775de35a9aef023fec5.tar.gz focaccia-5d51b4fe0bb41bc9e86c5775de35a9aef023fec5.zip | |
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 <theofilos.augoustis@gmail.com> Co-authored-by: Nicola Crivellin <nicola.crivellin98@gmail.com>
Diffstat (limited to 'lldb_target.py')
| -rw-r--r-- | lldb_target.py | 9 |
1 files changed, 5 insertions, 4 deletions
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? - "<no-name>", # name? + 0, # offset? + name if name is not None else '<none>', perms)) return mmap |