angr 9.2.163__cp310-abi3-macosx_11_0_arm64.whl → 9.2.165__cp310-abi3-macosx_11_0_arm64.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/ailment/converter_vex.py +1 -1
- angr/ailment/expression.py +5 -1
- angr/analyses/analysis.py +27 -4
- angr/analyses/cfg/cfg_base.py +16 -13
- angr/analyses/cfg/cfg_emulated.py +5 -1
- angr/analyses/cfg/cfg_fast.py +43 -5
- angr/analyses/cfg/indirect_jump_resolvers/arm_elf_fast.py +11 -1
- angr/analyses/cfg/indirect_jump_resolvers/const_resolver.py +194 -41
- angr/analyses/decompiler/ail_simplifier.py +19 -5
- angr/analyses/decompiler/callsite_maker.py +33 -17
- angr/analyses/decompiler/condition_processor.py +9 -8
- angr/analyses/decompiler/graph_region.py +19 -0
- angr/analyses/decompiler/optimization_passes/deadblock_remover.py +1 -1
- angr/analyses/decompiler/peephole_optimizations/__init__.py +2 -0
- angr/analyses/decompiler/peephole_optimizations/inlined_memcpy.py +78 -0
- angr/analyses/decompiler/peephole_optimizations/inlined_strcpy.py +67 -10
- angr/analyses/decompiler/peephole_optimizations/inlined_strcpy_consolidation.py +10 -13
- angr/analyses/decompiler/region_identifier.py +22 -1
- angr/analyses/decompiler/structuring/phoenix.py +72 -20
- angr/analyses/decompiler/structuring/recursive_structurer.py +3 -4
- angr/analyses/decompiler/structuring/structurer_nodes.py +3 -0
- angr/analyses/decompiler/utils.py +17 -5
- angr/analyses/deobfuscator/string_obf_finder.py +130 -32
- angr/analyses/s_reaching_definitions/s_rda_view.py +2 -1
- angr/analyses/typehoon/typeconsts.py +3 -1
- angr/blade.py +20 -15
- angr/engines/icicle.py +16 -3
- angr/knowledge_plugins/propagations/propagation_model.py +7 -0
- angr/rustylib.abi3.so +0 -0
- angr/sim_type.py +16 -1
- angr/state_plugins/history.py +16 -0
- angr/unicornlib.dylib +0 -0
- angr/utils/constants.py +1 -1
- angr/utils/graph.py +1 -1
- angr/utils/vex.py +11 -0
- {angr-9.2.163.dist-info → angr-9.2.165.dist-info}/METADATA +5 -5
- {angr-9.2.163.dist-info → angr-9.2.165.dist-info}/RECORD +1409 -1407
- {angr-9.2.163.dist-info → angr-9.2.165.dist-info}/WHEEL +1 -0
- {angr-9.2.163.dist-info → angr-9.2.165.dist-info}/entry_points.txt +0 -0
- {angr-9.2.163.dist-info → angr-9.2.165.dist-info}/licenses/LICENSE +0 -0
- {angr-9.2.163.dist-info → angr-9.2.165.dist-info}/top_level.txt +0 -0
|
@@ -19,6 +19,7 @@ class PropagationModel(Serializable):
|
|
|
19
19
|
"_initial_state",
|
|
20
20
|
"block_initial_reg_values",
|
|
21
21
|
"equivalence",
|
|
22
|
+
"function_block_count",
|
|
22
23
|
"graph_visitor",
|
|
23
24
|
"input_states",
|
|
24
25
|
"key",
|
|
@@ -37,6 +38,7 @@ class PropagationModel(Serializable):
|
|
|
37
38
|
equivalence: set | None = None,
|
|
38
39
|
function: Function | None = None,
|
|
39
40
|
input_states: dict | None = None,
|
|
41
|
+
function_block_count: int | None = None,
|
|
40
42
|
):
|
|
41
43
|
self.key = prop_key
|
|
42
44
|
self.node_iterations = node_iterations if node_iterations is not None else defaultdict(int)
|
|
@@ -49,6 +51,11 @@ class PropagationModel(Serializable):
|
|
|
49
51
|
self.graph_visitor = None
|
|
50
52
|
self._initial_state = None
|
|
51
53
|
self._function = function
|
|
54
|
+
self.function_block_count = (
|
|
55
|
+
function_block_count
|
|
56
|
+
if function_block_count is not None
|
|
57
|
+
else len(function.block_addrs_set) if function is not None else None
|
|
58
|
+
)
|
|
52
59
|
|
|
53
60
|
def downsize(self):
|
|
54
61
|
self.node_iterations = None
|
angr/rustylib.abi3.so
CHANGED
|
Binary file
|
angr/sim_type.py
CHANGED
|
@@ -1789,6 +1789,7 @@ class SimCppClass(SimStruct):
|
|
|
1789
1789
|
vtable_ptrs=None,
|
|
1790
1790
|
pack: bool = False,
|
|
1791
1791
|
align=None,
|
|
1792
|
+
size: int | None = None,
|
|
1792
1793
|
):
|
|
1793
1794
|
super().__init__(members or {}, name=name, pack=pack, align=align)
|
|
1794
1795
|
self.unique_name = unique_name
|
|
@@ -1797,6 +1798,10 @@ class SimCppClass(SimStruct):
|
|
|
1797
1798
|
# this should also be added to the fields once we know the offsets of the members of this object
|
|
1798
1799
|
self.vtable_ptrs = [] if vtable_ptrs is None else vtable_ptrs
|
|
1799
1800
|
|
|
1801
|
+
# we can force the size (in bits) of a class because sometimes the class can be opaque and we don't know its
|
|
1802
|
+
# layout
|
|
1803
|
+
self._size = size
|
|
1804
|
+
|
|
1800
1805
|
@property
|
|
1801
1806
|
def members(self):
|
|
1802
1807
|
return self.fields
|
|
@@ -1805,6 +1810,12 @@ class SimCppClass(SimStruct):
|
|
|
1805
1810
|
def members(self, value):
|
|
1806
1811
|
self.fields = value
|
|
1807
1812
|
|
|
1813
|
+
@property
|
|
1814
|
+
def size(self):
|
|
1815
|
+
if self._size is not None:
|
|
1816
|
+
return self._size
|
|
1817
|
+
return super().size
|
|
1818
|
+
|
|
1808
1819
|
def __repr__(self):
|
|
1809
1820
|
return f"class {self.name}" if not self.name.startswith("class") else self.name
|
|
1810
1821
|
|
|
@@ -1848,6 +1859,7 @@ class SimCppClass(SimStruct):
|
|
|
1848
1859
|
vtable_ptrs=self.vtable_ptrs,
|
|
1849
1860
|
pack=self._pack,
|
|
1850
1861
|
align=self._align,
|
|
1862
|
+
size=self._size,
|
|
1851
1863
|
)
|
|
1852
1864
|
out._arch = arch
|
|
1853
1865
|
self._arch_memo[arch.name] = out
|
|
@@ -1877,6 +1889,7 @@ class SimCppClass(SimStruct):
|
|
|
1877
1889
|
align=self._align,
|
|
1878
1890
|
function_members=self.function_members,
|
|
1879
1891
|
vtable_ptrs=self.vtable_ptrs,
|
|
1892
|
+
size=self._size,
|
|
1880
1893
|
)
|
|
1881
1894
|
|
|
1882
1895
|
|
|
@@ -2029,6 +2042,8 @@ BASIC_TYPES: dict[str, SimType] = {
|
|
|
2029
2042
|
"long long int": SimTypeLongLong(True),
|
|
2030
2043
|
"signed long long int": SimTypeLongLong(True),
|
|
2031
2044
|
"unsigned long long int": SimTypeLongLong(False),
|
|
2045
|
+
"__int32": SimTypeInt(True),
|
|
2046
|
+
"__int64": SimTypeLongLong(True),
|
|
2032
2047
|
"__int128": SimTypeNum(128, True),
|
|
2033
2048
|
"unsigned __int128": SimTypeNum(128, False),
|
|
2034
2049
|
"__int256": SimTypeNum(256, True),
|
|
@@ -3563,7 +3578,7 @@ def _cpp_decl_to_type(
|
|
|
3563
3578
|
t = ALL_TYPES[lbl]
|
|
3564
3579
|
elif opaque_classes is True:
|
|
3565
3580
|
# create a class without knowing the internal members
|
|
3566
|
-
t = SimCppClass(unique_name=lbl, name=lbl, members={})
|
|
3581
|
+
t = SimCppClass(unique_name=lbl, name=lbl, members={}, size=32)
|
|
3567
3582
|
else:
|
|
3568
3583
|
raise TypeError(f'Unknown type "{lbl}"')
|
|
3569
3584
|
|
angr/state_plugins/history.py
CHANGED
|
@@ -59,6 +59,9 @@ class SimStateHistory(SimStatePlugin):
|
|
|
59
59
|
self.recent_syscall_count = 0 if clone is None else clone.recent_syscall_count
|
|
60
60
|
self.recent_instruction_count = -1 if clone is None else clone.recent_instruction_count
|
|
61
61
|
|
|
62
|
+
# afl-style hitmap
|
|
63
|
+
self.edge_hitmap: bytes | None = None if clone is None else clone.edge_hitmap
|
|
64
|
+
|
|
62
65
|
# satness stuff
|
|
63
66
|
self._all_constraints = ()
|
|
64
67
|
self._satisfiable = None
|
|
@@ -402,6 +405,19 @@ class SimStateHistory(SimStatePlugin):
|
|
|
402
405
|
def stack_actions(self):
|
|
403
406
|
return LambdaIterIter(self, operator.attrgetter("recent_stack_actions"))
|
|
404
407
|
|
|
408
|
+
@property
|
|
409
|
+
def last_edge_hitmap(self) -> bytes | None:
|
|
410
|
+
"""
|
|
411
|
+
Returns the last edge hitmap in the history chain, or None if there is no edge hitmap.
|
|
412
|
+
"""
|
|
413
|
+
history = self
|
|
414
|
+
while history is not None:
|
|
415
|
+
if history.edge_hitmap is not None:
|
|
416
|
+
return history.edge_hitmap
|
|
417
|
+
# Traverse to the previous state in the history chain
|
|
418
|
+
history = history.parent
|
|
419
|
+
return None
|
|
420
|
+
|
|
405
421
|
#
|
|
406
422
|
# Merging support
|
|
407
423
|
#
|
angr/unicornlib.dylib
CHANGED
|
Binary file
|
angr/utils/constants.py
CHANGED
angr/utils/graph.py
CHANGED
|
@@ -76,7 +76,7 @@ def to_acyclic_graph(
|
|
|
76
76
|
for src, dst in graph.edges():
|
|
77
77
|
src_order = node_order[src]
|
|
78
78
|
dst_order = node_order[dst]
|
|
79
|
-
if src_order
|
|
79
|
+
if src_order >= dst_order:
|
|
80
80
|
# this is a back edge, we need to remove it
|
|
81
81
|
edges_to_remove.append((src, dst))
|
|
82
82
|
|
angr/utils/vex.py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from pyvex import IRSB
|
|
4
|
+
from pyvex.stmt import WrTmp
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def get_tmp_def_stmt(vex_block: IRSB, tmp_idx: int) -> int | None:
|
|
8
|
+
for i, stmt in enumerate(vex_block.statements):
|
|
9
|
+
if isinstance(stmt, WrTmp) and stmt.tmp == tmp_idx:
|
|
10
|
+
return i
|
|
11
|
+
return None
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: angr
|
|
3
|
-
Version: 9.2.
|
|
3
|
+
Version: 9.2.165
|
|
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
|
License: BSD-2-Clause
|
|
6
6
|
Project-URL: Homepage, https://angr.io/
|
|
@@ -16,12 +16,12 @@ Description-Content-Type: text/markdown
|
|
|
16
16
|
License-File: LICENSE
|
|
17
17
|
Requires-Dist: cxxheaderparser
|
|
18
18
|
Requires-Dist: GitPython
|
|
19
|
-
Requires-Dist: archinfo==9.2.
|
|
19
|
+
Requires-Dist: archinfo==9.2.165
|
|
20
20
|
Requires-Dist: cachetools
|
|
21
21
|
Requires-Dist: capstone==5.0.3
|
|
22
22
|
Requires-Dist: cffi>=1.14.0
|
|
23
|
-
Requires-Dist: claripy==9.2.
|
|
24
|
-
Requires-Dist: cle==9.2.
|
|
23
|
+
Requires-Dist: claripy==9.2.165
|
|
24
|
+
Requires-Dist: cle==9.2.165
|
|
25
25
|
Requires-Dist: mulpyplexer
|
|
26
26
|
Requires-Dist: networkx!=2.8.1,>=2.0
|
|
27
27
|
Requires-Dist: protobuf>=5.28.2
|
|
@@ -30,7 +30,7 @@ Requires-Dist: pycparser>=2.18
|
|
|
30
30
|
Requires-Dist: pydemumble
|
|
31
31
|
Requires-Dist: pyformlang
|
|
32
32
|
Requires-Dist: pypcode<4.0,>=3.2.1
|
|
33
|
-
Requires-Dist: pyvex==9.2.
|
|
33
|
+
Requires-Dist: pyvex==9.2.165
|
|
34
34
|
Requires-Dist: rich>=13.1.0
|
|
35
35
|
Requires-Dist: sortedcontainers
|
|
36
36
|
Requires-Dist: sympy
|