angr 9.2.122__py3-none-win_amd64.whl → 9.2.124__py3-none-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of angr might be problematic. Click here for more details.
- angr/__init__.py +1 -1
- angr/analyses/calling_convention.py +6 -1
- angr/analyses/cfg/indirect_jump_resolvers/mips_elf_fast.py +11 -8
- angr/analyses/cfg/indirect_jump_resolvers/mips_elf_got.py +2 -2
- angr/analyses/decompiler/ail_simplifier.py +38 -342
- angr/analyses/decompiler/callsite_maker.py +8 -7
- angr/analyses/decompiler/ccall_rewriters/amd64_ccalls.py +24 -2
- angr/analyses/decompiler/clinic.py +30 -3
- angr/analyses/decompiler/condition_processor.py +10 -3
- angr/analyses/decompiler/decompilation_cache.py +2 -0
- angr/analyses/decompiler/decompiler.py +50 -8
- angr/analyses/decompiler/dephication/graph_vvar_mapping.py +10 -2
- angr/analyses/decompiler/dephication/rewriting_engine.py +65 -2
- angr/analyses/decompiler/expression_narrower.py +206 -6
- angr/analyses/decompiler/optimization_passes/div_simplifier.py +4 -1
- angr/analyses/decompiler/optimization_passes/inlined_string_transformation_simplifier.py +7 -0
- angr/analyses/decompiler/optimization_passes/ite_region_converter.py +34 -11
- angr/analyses/decompiler/optimization_passes/lowered_switch_simplifier.py +10 -1
- angr/analyses/decompiler/optimization_passes/optimization_pass.py +3 -1
- angr/analyses/decompiler/optimization_passes/return_duplicator_base.py +8 -5
- angr/analyses/decompiler/optimization_passes/return_duplicator_high.py +10 -5
- angr/analyses/decompiler/optimization_passes/return_duplicator_low.py +18 -7
- angr/analyses/decompiler/optimization_passes/switch_default_case_duplicator.py +6 -0
- angr/analyses/decompiler/optimization_passes/win_stack_canary_simplifier.py +2 -0
- angr/analyses/decompiler/peephole_optimizations/const_mull_a_shift.py +75 -42
- angr/analyses/decompiler/peephole_optimizations/remove_cascading_conversions.py +8 -2
- angr/analyses/decompiler/region_identifier.py +36 -0
- angr/analyses/decompiler/region_simplifiers/expr_folding.py +4 -0
- angr/analyses/decompiler/region_simplifiers/loop.py +2 -8
- angr/analyses/decompiler/region_simplifiers/switch_cluster_simplifier.py +9 -3
- angr/analyses/decompiler/sequence_walker.py +20 -4
- angr/analyses/decompiler/ssailification/rewriting.py +5 -2
- angr/analyses/decompiler/ssailification/rewriting_engine.py +151 -25
- angr/analyses/decompiler/ssailification/rewriting_state.py +1 -0
- angr/analyses/decompiler/ssailification/ssailification.py +17 -9
- angr/analyses/decompiler/ssailification/traversal.py +3 -1
- angr/analyses/decompiler/ssailification/traversal_engine.py +35 -8
- angr/analyses/decompiler/ssailification/traversal_state.py +1 -0
- angr/analyses/decompiler/structured_codegen/c.py +42 -4
- angr/analyses/decompiler/structuring/phoenix.py +3 -0
- angr/analyses/propagator/engine_ail.py +10 -3
- angr/analyses/reaching_definitions/engine_ail.py +10 -15
- angr/analyses/s_propagator.py +26 -15
- angr/analyses/s_reaching_definitions/s_rda_view.py +127 -63
- angr/analyses/variable_recovery/engine_ail.py +14 -0
- angr/analyses/variable_recovery/engine_base.py +11 -0
- angr/calling_conventions.py +2 -2
- angr/engines/light/engine.py +24 -2
- angr/engines/soot/expressions/instanceOf.py +4 -1
- angr/engines/successors.py +1 -1
- angr/engines/vex/heavy/concretizers.py +47 -47
- angr/engines/vex/heavy/dirty.py +4 -4
- angr/knowledge_plugins/__init__.py +2 -0
- angr/knowledge_plugins/decompilation.py +45 -0
- angr/knowledge_plugins/key_definitions/atoms.py +8 -0
- angr/lib/angr_native.dll +0 -0
- angr/procedures/definitions/parse_win32json.py +2 -1
- angr/procedures/java_lang/getsimplename.py +4 -1
- angr/procedures/linux_kernel/iovec.py +5 -2
- angr/sim_type.py +3 -1
- angr/storage/memory_mixins/actions_mixin.py +7 -7
- angr/storage/memory_mixins/address_concretization_mixin.py +5 -5
- angr/storage/memory_mixins/bvv_conversion_mixin.py +1 -1
- angr/storage/memory_mixins/clouseau_mixin.py +3 -3
- angr/storage/memory_mixins/conditional_store_mixin.py +3 -3
- angr/storage/memory_mixins/default_filler_mixin.py +3 -3
- angr/storage/memory_mixins/memory_mixin.py +45 -34
- angr/storage/memory_mixins/paged_memory/page_backer_mixins.py +15 -14
- angr/storage/memory_mixins/paged_memory/paged_memory_mixin.py +27 -16
- angr/storage/memory_mixins/paged_memory/pages/cooperation.py +18 -9
- angr/storage/memory_mixins/paged_memory/pages/ispo_mixin.py +5 -5
- angr/storage/memory_mixins/paged_memory/pages/multi_values.py +89 -55
- angr/storage/memory_mixins/paged_memory/pages/mv_list_page.py +16 -25
- angr/storage/memory_mixins/paged_memory/pages/permissions_mixin.py +11 -9
- angr/storage/memory_mixins/paged_memory/pages/ultra_page.py +23 -7
- angr/storage/memory_mixins/paged_memory/privileged_mixin.py +1 -1
- angr/storage/memory_mixins/regioned_memory/region_meta_mixin.py +9 -7
- angr/storage/memory_mixins/regioned_memory/regioned_memory_mixin.py +9 -9
- angr/storage/memory_mixins/regioned_memory/static_find_mixin.py +1 -0
- angr/storage/memory_mixins/simple_interface_mixin.py +2 -2
- angr/storage/memory_mixins/simplification_mixin.py +2 -2
- angr/storage/memory_mixins/size_resolution_mixin.py +1 -1
- angr/storage/memory_mixins/slotted_memory.py +3 -3
- angr/storage/memory_mixins/smart_find_mixin.py +1 -0
- angr/storage/memory_mixins/underconstrained_mixin.py +5 -5
- angr/storage/memory_mixins/unwrapper_mixin.py +4 -4
- angr/storage/memory_object.py +4 -3
- angr/utils/constants.py +1 -1
- angr/utils/graph.py +15 -0
- angr/vaults.py +2 -2
- {angr-9.2.122.dist-info → angr-9.2.124.dist-info}/METADATA +7 -6
- {angr-9.2.122.dist-info → angr-9.2.124.dist-info}/RECORD +96 -95
- {angr-9.2.122.dist-info → angr-9.2.124.dist-info}/WHEEL +1 -1
- {angr-9.2.122.dist-info → angr-9.2.124.dist-info}/LICENSE +0 -0
- {angr-9.2.122.dist-info → angr-9.2.124.dist-info}/entry_points.txt +0 -0
- {angr-9.2.122.dist-info → angr-9.2.124.dist-info}/top_level.txt +0 -0
|
@@ -22,15 +22,15 @@ class UnderconstrainedMixin(MemoryMixin):
|
|
|
22
22
|
out._unconstrained_range = self._unconstrained_range
|
|
23
23
|
return out
|
|
24
24
|
|
|
25
|
-
def load(self, addr, **kwargs):
|
|
25
|
+
def load(self, addr, size=None, **kwargs):
|
|
26
26
|
self._constrain_underconstrained_index(addr)
|
|
27
|
-
return super().load(addr, **kwargs)
|
|
27
|
+
return super().load(addr, size, **kwargs)
|
|
28
28
|
|
|
29
|
-
def store(self, addr, data, **kwargs):
|
|
29
|
+
def store(self, addr, data, size=None, **kwargs):
|
|
30
30
|
self._constrain_underconstrained_index(addr)
|
|
31
|
-
super().store(addr, data, **kwargs)
|
|
31
|
+
super().store(addr, data, size, **kwargs)
|
|
32
32
|
|
|
33
|
-
def _default_value(self, addr, size, name=None, key=None, inspect=True, events=True, **kwargs):
|
|
33
|
+
def _default_value(self, addr, size, *, name=None, key=None, inspect=True, events=True, **kwargs):
|
|
34
34
|
if o.UNDER_CONSTRAINED_SYMEXEC in self.state.options and type(addr) is int:
|
|
35
35
|
if self.category == "mem":
|
|
36
36
|
alloc_depth = self.state.uc_manager.get_alloc_depth(addr)
|
|
@@ -8,18 +8,18 @@ class UnwrapperMixin(MemoryMixin):
|
|
|
8
8
|
This mixin processes SimActionObjects by passing on their .ast field.
|
|
9
9
|
"""
|
|
10
10
|
|
|
11
|
-
def store(self, addr, data, size=None, condition=None, **kwargs):
|
|
11
|
+
def store(self, addr, data, size=None, *, condition=None, **kwargs):
|
|
12
12
|
return super().store(
|
|
13
13
|
_raw_ast(addr), _raw_ast(data), size=_raw_ast(size), condition=_raw_ast(condition), **kwargs
|
|
14
14
|
)
|
|
15
15
|
|
|
16
|
-
def load(self, addr, size=None, condition=None, fallback=None, **kwargs):
|
|
16
|
+
def load(self, addr, size=None, *, condition=None, fallback=None, **kwargs):
|
|
17
17
|
return super().load(
|
|
18
18
|
_raw_ast(addr), size=_raw_ast(size), condition=_raw_ast(condition), fallback=_raw_ast(fallback), **kwargs
|
|
19
19
|
)
|
|
20
20
|
|
|
21
|
-
def find(self, addr,
|
|
22
|
-
return super().find(_raw_ast(addr), _raw_ast(
|
|
21
|
+
def find(self, addr, data, max_search, *, default=None, **kwargs):
|
|
22
|
+
return super().find(_raw_ast(addr), _raw_ast(data), max_search, default=_raw_ast(default), **kwargs)
|
|
23
23
|
|
|
24
24
|
def copy_contents(self, dst, src, size, condition=None, **kwargs):
|
|
25
25
|
return super().copy_contents(_raw_ast(dst), _raw_ast(src), _raw_ast(size), _raw_ast(condition), **kwargs)
|
angr/storage/memory_object.py
CHANGED
|
@@ -42,7 +42,7 @@ class SimMemoryObject:
|
|
|
42
42
|
raise SimMemoryError("bytes can only be stored big-endian")
|
|
43
43
|
self._byte_width = byte_width
|
|
44
44
|
self.base = base
|
|
45
|
-
self.object = obj
|
|
45
|
+
self.object: claripy.ast.BV | claripy.ast.FP = obj
|
|
46
46
|
self.length = obj_bit_size(obj) // self._byte_width if length is None else length
|
|
47
47
|
self.endness = endness
|
|
48
48
|
self._concrete_bytes: bytes | None = None
|
|
@@ -98,8 +98,9 @@ class SimMemoryObject:
|
|
|
98
98
|
return o if allow_concrete else claripy.BVV(o)
|
|
99
99
|
|
|
100
100
|
offset = addr - self.base
|
|
101
|
+
bv_obj = claripy.fpToIEEEBV(self.object) if isinstance(self.object, claripy.ast.FP) else self.object
|
|
101
102
|
try:
|
|
102
|
-
thing = bv_slice(
|
|
103
|
+
thing = bv_slice(bv_obj, offset, length, self.endness == "Iend_LE", self._byte_width)
|
|
103
104
|
except claripy.ClaripyOperationError:
|
|
104
105
|
# hacks to handle address space wrapping
|
|
105
106
|
if offset >= 0:
|
|
@@ -110,7 +111,7 @@ class SimMemoryObject:
|
|
|
110
111
|
offset += 2**64
|
|
111
112
|
else:
|
|
112
113
|
raise
|
|
113
|
-
thing = bv_slice(
|
|
114
|
+
thing = bv_slice(bv_obj, offset, length, self.endness == "Iend_LE", self._byte_width)
|
|
114
115
|
|
|
115
116
|
if self.endness != endness:
|
|
116
117
|
thing = thing.reversed
|
angr/utils/constants.py
CHANGED
angr/utils/graph.py
CHANGED
|
@@ -414,6 +414,7 @@ class Dominators:
|
|
|
414
414
|
container_nodes = {}
|
|
415
415
|
|
|
416
416
|
traversed_nodes = set()
|
|
417
|
+
endnode_encountered = False
|
|
417
418
|
while queue:
|
|
418
419
|
node = queue.pop()
|
|
419
420
|
|
|
@@ -433,9 +434,11 @@ class Dominators:
|
|
|
433
434
|
# may end with a loop.
|
|
434
435
|
if self._reverse:
|
|
435
436
|
# Add an edge between the start node and this node
|
|
437
|
+
endnode_encountered = True
|
|
436
438
|
new_graph.add_edge(start_node, container_node)
|
|
437
439
|
else:
|
|
438
440
|
# Add an edge between our this node and end node
|
|
441
|
+
endnode_encountered = True
|
|
439
442
|
new_graph.add_edge(container_node, end_node)
|
|
440
443
|
|
|
441
444
|
for s in successors:
|
|
@@ -451,6 +454,18 @@ class Dominators:
|
|
|
451
454
|
if container_s not in traversed_nodes:
|
|
452
455
|
queue.append(s)
|
|
453
456
|
|
|
457
|
+
if not endnode_encountered:
|
|
458
|
+
# the graph is a circle with no end node. we run it with DFS to identify an end node
|
|
459
|
+
nn = next((nn for nn in networkx.dfs_postorder_nodes(graph) if nn in container_nodes), None)
|
|
460
|
+
if nn is not None:
|
|
461
|
+
if self._reverse:
|
|
462
|
+
new_graph.add_edge(start_node, container_nodes[nn])
|
|
463
|
+
else:
|
|
464
|
+
new_graph.add_edge(container_nodes[nn], end_node)
|
|
465
|
+
else:
|
|
466
|
+
# the graph must be empty - totally unexpected!
|
|
467
|
+
raise RuntimeError("Cannot find any end node candidates in the graph. Is the graph empty?")
|
|
468
|
+
|
|
454
469
|
if self._reverse:
|
|
455
470
|
# Add the end node
|
|
456
471
|
new_graph.add_edge(container_nodes[n], end_node)
|
angr/vaults.py
CHANGED
|
@@ -311,7 +311,7 @@ class VaultShelf(VaultDict):
|
|
|
311
311
|
|
|
312
312
|
def __init__(self, path=None):
|
|
313
313
|
self._path = tempfile.mktemp() if path is None else path
|
|
314
|
-
s = shelve.open(self._path, protocol=-1)
|
|
314
|
+
s = shelve.open(self._path, protocol=-1) # noqa: SIM115
|
|
315
315
|
super().__init__(s)
|
|
316
316
|
|
|
317
317
|
def close(self):
|
|
@@ -334,7 +334,7 @@ class VaultDirShelf(VaultDict):
|
|
|
334
334
|
@contextlib.contextmanager
|
|
335
335
|
def _locked_shelve(self, shelve_path):
|
|
336
336
|
with self._lock:
|
|
337
|
-
self._dict = shelve.open(shelve_path, protocol=-1)
|
|
337
|
+
self._dict = shelve.open(shelve_path, protocol=-1) # noqa: SIM115
|
|
338
338
|
yield
|
|
339
339
|
self._dict.close()
|
|
340
340
|
self._dict = None
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: angr
|
|
3
|
-
Version: 9.2.
|
|
3
|
+
Version: 9.2.124
|
|
4
4
|
Summary: A multi-architecture binary analysis toolkit, with the ability to perform dynamic symbolic execution and various static analyses on binaries
|
|
5
5
|
Home-page: https://github.com/angr/angr
|
|
6
6
|
License: BSD-2-Clause
|
|
@@ -10,18 +10,19 @@ Classifier: Programming Language :: Python :: 3 :: Only
|
|
|
10
10
|
Classifier: Programming Language :: Python :: 3.10
|
|
11
11
|
Classifier: Programming Language :: Python :: 3.11
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
13
14
|
Requires-Python: >=3.10
|
|
14
15
|
Description-Content-Type: text/markdown
|
|
15
16
|
License-File: LICENSE
|
|
16
17
|
Requires-Dist: CppHeaderParser
|
|
17
18
|
Requires-Dist: GitPython
|
|
18
|
-
Requires-Dist: ailment==9.2.
|
|
19
|
-
Requires-Dist: archinfo==9.2.
|
|
19
|
+
Requires-Dist: ailment==9.2.124
|
|
20
|
+
Requires-Dist: archinfo==9.2.124
|
|
20
21
|
Requires-Dist: cachetools
|
|
21
22
|
Requires-Dist: capstone==5.0.3
|
|
22
23
|
Requires-Dist: cffi>=1.14.0
|
|
23
|
-
Requires-Dist: claripy==9.2.
|
|
24
|
-
Requires-Dist: cle==9.2.
|
|
24
|
+
Requires-Dist: claripy==9.2.124
|
|
25
|
+
Requires-Dist: cle==9.2.124
|
|
25
26
|
Requires-Dist: itanium-demangler
|
|
26
27
|
Requires-Dist: mulpyplexer
|
|
27
28
|
Requires-Dist: nampa
|
|
@@ -30,7 +31,7 @@ Requires-Dist: protobuf>=5.28.2
|
|
|
30
31
|
Requires-Dist: psutil
|
|
31
32
|
Requires-Dist: pycparser>=2.18
|
|
32
33
|
Requires-Dist: pyformlang
|
|
33
|
-
Requires-Dist: pyvex==9.2.
|
|
34
|
+
Requires-Dist: pyvex==9.2.124
|
|
34
35
|
Requires-Dist: rich>=13.1.0
|
|
35
36
|
Requires-Dist: sortedcontainers
|
|
36
37
|
Requires-Dist: sympy
|