angr 9.2.80__py3-none-win_amd64.whl → 9.2.81__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/propagator/engine_vex.py +16 -9
- angr/analyses/reaching_definitions/rd_state.py +4 -4
- angr/calling_conventions.py +11 -7
- angr/lib/angr_native.dll +0 -0
- {angr-9.2.80.dist-info → angr-9.2.81.dist-info}/METADATA +6 -6
- {angr-9.2.80.dist-info → angr-9.2.81.dist-info}/RECORD +12 -12
- tests/analyses/test_constantpropagation.py +5 -4
- {angr-9.2.80.dist-info → angr-9.2.81.dist-info}/LICENSE +0 -0
- {angr-9.2.80.dist-info → angr-9.2.81.dist-info}/WHEEL +0 -0
- {angr-9.2.80.dist-info → angr-9.2.81.dist-info}/entry_points.txt +0 -0
- {angr-9.2.80.dist-info → angr-9.2.81.dist-info}/top_level.txt +0 -0
angr/__init__.py
CHANGED
|
@@ -7,7 +7,7 @@ import archinfo
|
|
|
7
7
|
|
|
8
8
|
from angr.knowledge_plugins.propagations.states import RegisterAnnotation, RegisterComparisonAnnotation
|
|
9
9
|
from ...engines.light import SimEngineLightVEXMixin
|
|
10
|
-
from ...calling_conventions import DEFAULT_CC, default_cc, SimRegArg
|
|
10
|
+
from ...calling_conventions import DEFAULT_CC, SYSCALL_CC, default_cc, SimRegArg
|
|
11
11
|
from .values import Top, Bottom
|
|
12
12
|
from .engine_base import SimEnginePropagatorBase
|
|
13
13
|
from .top_checker_mixin import TopCheckerMixin
|
|
@@ -31,18 +31,18 @@ class SimEnginePropagatorVEX(
|
|
|
31
31
|
# Private methods
|
|
32
32
|
#
|
|
33
33
|
|
|
34
|
-
def
|
|
35
|
-
super().
|
|
36
|
-
|
|
34
|
+
def _process_block_end(self):
|
|
35
|
+
super()._process_block_end()
|
|
37
36
|
if self.block.vex.jumpkind == "Ijk_Call":
|
|
38
37
|
if self.arch.call_pushes_ret:
|
|
39
38
|
# pop ret from the stack
|
|
40
39
|
sp_offset = self.arch.sp_offset
|
|
41
|
-
sp_value = state.load_register(sp_offset, self.arch.bytes)
|
|
40
|
+
sp_value = self.state.load_register(sp_offset, self.arch.bytes)
|
|
42
41
|
if sp_value is not None:
|
|
43
|
-
state.store_register(sp_offset, self.arch.bytes, sp_value + self.arch.bytes)
|
|
42
|
+
self.state.store_register(sp_offset, self.arch.bytes, sp_value + self.arch.bytes)
|
|
44
43
|
|
|
45
|
-
|
|
44
|
+
if self.block.vex.jumpkind == "Ijk_Call" or self.block.vex.jumpkind.startswith("Ijk_Sys"):
|
|
45
|
+
self._handle_return_from_call()
|
|
46
46
|
|
|
47
47
|
def _allow_loading(self, addr, size):
|
|
48
48
|
if type(addr) in (Top, Bottom):
|
|
@@ -110,9 +110,16 @@ class SimEnginePropagatorVEX(
|
|
|
110
110
|
# ret
|
|
111
111
|
ebx_offset = self.arch.registers["ebx"][0]
|
|
112
112
|
self.state.store_register(ebx_offset, 4, claripy.BVV(self.block.addr + self.block.size, 32))
|
|
113
|
-
|
|
113
|
+
|
|
114
|
+
def _handle_return_from_call(self):
|
|
115
|
+
# FIXME: Handle the specific function calling convention when known
|
|
116
|
+
syscall = self.block.vex.jumpkind.startswith("Ijk_Sys")
|
|
117
|
+
cc_map = SYSCALL_CC if syscall else DEFAULT_CC
|
|
118
|
+
if self.arch.name in cc_map:
|
|
114
119
|
cc = default_cc(
|
|
115
|
-
self.arch.name,
|
|
120
|
+
self.arch.name,
|
|
121
|
+
platform=self.project.simos.name if self.project.simos is not None else None,
|
|
122
|
+
syscall=syscall,
|
|
116
123
|
) # don't instantiate the class for speed
|
|
117
124
|
if isinstance(cc.RETURN_VAL, SimRegArg):
|
|
118
125
|
offset, size = self.arch.registers[cc.RETURN_VAL.reg_name]
|
|
@@ -566,19 +566,19 @@ class ReachingDefinitionsState:
|
|
|
566
566
|
@overload
|
|
567
567
|
def deref(
|
|
568
568
|
self,
|
|
569
|
-
pointer: Union[
|
|
569
|
+
pointer: Union[int, claripy.ast.bv.BV, HeapAddress, SpOffset],
|
|
570
570
|
size: Union[int, DerefSize],
|
|
571
571
|
endness: str = ...,
|
|
572
|
-
) ->
|
|
572
|
+
) -> Optional[MemoryLocation]:
|
|
573
573
|
...
|
|
574
574
|
|
|
575
575
|
@overload
|
|
576
576
|
def deref(
|
|
577
577
|
self,
|
|
578
|
-
pointer: Union[
|
|
578
|
+
pointer: Union[MultiValues, Atom, Definition, Iterable[Atom], Iterable[Definition]],
|
|
579
579
|
size: Union[int, DerefSize],
|
|
580
580
|
endness: str = ...,
|
|
581
|
-
) ->
|
|
581
|
+
) -> Set[MemoryLocation]:
|
|
582
582
|
...
|
|
583
583
|
|
|
584
584
|
def deref(
|
angr/calling_conventions.py
CHANGED
|
@@ -1592,6 +1592,7 @@ class SimCCAMD64LinuxSyscall(SimCCSyscall):
|
|
|
1592
1592
|
RETURN_VAL = SimRegArg("rax", 8)
|
|
1593
1593
|
RETURN_ADDR = SimRegArg("ip_at_syscall", 8)
|
|
1594
1594
|
ARCH = archinfo.ArchAMD64
|
|
1595
|
+
CALLER_SAVED_REGS = ["rax", "rcx", "r11"]
|
|
1595
1596
|
|
|
1596
1597
|
@staticmethod
|
|
1597
1598
|
def _match(arch, args, sp_delta): # pylint: disable=unused-argument
|
|
@@ -2257,6 +2258,7 @@ def default_cc( # pylint:disable=unused-argument
|
|
|
2257
2258
|
arch: str,
|
|
2258
2259
|
platform: Optional[str] = "Linux",
|
|
2259
2260
|
language: Optional[str] = None,
|
|
2261
|
+
syscall: bool = False,
|
|
2260
2262
|
**kwargs,
|
|
2261
2263
|
) -> Optional[Type[SimCC]]:
|
|
2262
2264
|
"""
|
|
@@ -2265,6 +2267,7 @@ def default_cc( # pylint:disable=unused-argument
|
|
|
2265
2267
|
:param arch: The architecture name.
|
|
2266
2268
|
:param platform: The platform name (e.g., "Linux" or "Win32").
|
|
2267
2269
|
:param language: The programming language name (e.g., "go").
|
|
2270
|
+
:param syscall: Return syscall convention (True), or normal calling convention (False, default).
|
|
2268
2271
|
:return: A default calling convention class if we can find one for the architecture, platform, and
|
|
2269
2272
|
language combination, or None if nothing fits.
|
|
2270
2273
|
"""
|
|
@@ -2273,20 +2276,21 @@ def default_cc( # pylint:disable=unused-argument
|
|
|
2273
2276
|
platform = "Linux"
|
|
2274
2277
|
|
|
2275
2278
|
default = kwargs.get("default", ...)
|
|
2279
|
+
cc_map = SYSCALL_CC if syscall else DEFAULT_CC
|
|
2276
2280
|
|
|
2277
|
-
if arch in
|
|
2278
|
-
if platform not in
|
|
2281
|
+
if arch in cc_map:
|
|
2282
|
+
if platform not in cc_map[arch]:
|
|
2279
2283
|
if default is not ...:
|
|
2280
2284
|
return default
|
|
2281
|
-
if "Linux" in
|
|
2282
|
-
return
|
|
2283
|
-
return
|
|
2285
|
+
if "Linux" in cc_map[arch]:
|
|
2286
|
+
return cc_map[arch]["Linux"]
|
|
2287
|
+
return cc_map[arch][platform]
|
|
2284
2288
|
|
|
2285
2289
|
alias = unify_arch_name(arch)
|
|
2286
|
-
if alias not in
|
|
2290
|
+
if alias not in cc_map or platform not in cc_map[alias]:
|
|
2287
2291
|
if default is not ...:
|
|
2288
2292
|
return default
|
|
2289
|
-
return
|
|
2293
|
+
return cc_map[alias][platform]
|
|
2290
2294
|
|
|
2291
2295
|
|
|
2292
2296
|
def unify_arch_name(arch: str) -> str:
|
angr/lib/angr_native.dll
CHANGED
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: angr
|
|
3
|
-
Version: 9.2.
|
|
3
|
+
Version: 9.2.81
|
|
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
|
|
@@ -17,13 +17,13 @@ Description-Content-Type: text/markdown
|
|
|
17
17
|
License-File: LICENSE
|
|
18
18
|
Requires-Dist: CppHeaderParser
|
|
19
19
|
Requires-Dist: GitPython
|
|
20
|
-
Requires-Dist: ailment ==9.2.
|
|
21
|
-
Requires-Dist: archinfo ==9.2.
|
|
20
|
+
Requires-Dist: ailment ==9.2.81
|
|
21
|
+
Requires-Dist: archinfo ==9.2.81
|
|
22
22
|
Requires-Dist: cachetools
|
|
23
23
|
Requires-Dist: capstone ==5.0.0.post1
|
|
24
24
|
Requires-Dist: cffi >=1.14.0
|
|
25
|
-
Requires-Dist: claripy ==9.2.
|
|
26
|
-
Requires-Dist: cle ==9.2.
|
|
25
|
+
Requires-Dist: claripy ==9.2.81
|
|
26
|
+
Requires-Dist: cle ==9.2.81
|
|
27
27
|
Requires-Dist: dpkt
|
|
28
28
|
Requires-Dist: itanium-demangler
|
|
29
29
|
Requires-Dist: mulpyplexer
|
|
@@ -32,7 +32,7 @@ Requires-Dist: networkx !=2.8.1,>=2.0
|
|
|
32
32
|
Requires-Dist: protobuf >=3.19.0
|
|
33
33
|
Requires-Dist: psutil
|
|
34
34
|
Requires-Dist: pycparser >=2.18
|
|
35
|
-
Requires-Dist: pyvex ==9.2.
|
|
35
|
+
Requires-Dist: pyvex ==9.2.81
|
|
36
36
|
Requires-Dist: rich >=13.1.0
|
|
37
37
|
Requires-Dist: rpyc
|
|
38
38
|
Requires-Dist: sortedcontainers
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
angr/__init__.py,sha256=
|
|
1
|
+
angr/__init__.py,sha256=lx238j_2zUPsGA8g018HSBPT-NqVwE_2BiMSvPLid3k,3851
|
|
2
2
|
angr/__main__.py,sha256=kaO56Te6h73SM94BVtASF00q5QbBbC3eBs9poVc9sVI,1887
|
|
3
3
|
angr/annocfg.py,sha256=dK5JAdN4Ig_jgxTBZeZXwk3kAS4-IQUvE6T02GBZTDQ,10818
|
|
4
4
|
angr/blade.py,sha256=YySrLqj2Y3-td9FJnkjDqYyFvAeGhc5a5lrGoHKOT2A,15562
|
|
5
5
|
angr/block.py,sha256=FnsFukbXhLzYPW5zJRXMxNmvCRU4LFlFIaJwo5sAqkY,14468
|
|
6
6
|
angr/callable.py,sha256=-E9HelavtRY1xPAxCVXl120H8Rb7Myd2IcrXtWZFAOU,6034
|
|
7
|
-
angr/calling_conventions.py,sha256=
|
|
7
|
+
angr/calling_conventions.py,sha256=DlzXH3rrjyyiOYxBThKRNM4-I7HImOqYyh9H39DBLAA,90942
|
|
8
8
|
angr/code_location.py,sha256=ow0Z8OF8FNBPZs4PUmRej_5aHaKTmUIanYPro3iHAMs,5476
|
|
9
9
|
angr/codenode.py,sha256=J_lZNz8akZzBI4ok0KpI1eNGvZbCt_quOAeUplaEB6I,3784
|
|
10
10
|
angr/errors.py,sha256=QdVWy5wElJYd4srA2k2vFzHPiE69gkXfksB9B6y6W8Y,8245
|
|
@@ -244,7 +244,7 @@ angr/analyses/identifier/functions/strtol.py,sha256=Py_6Y9rR5dfy53LX8w9WktSBaxdy
|
|
|
244
244
|
angr/analyses/propagator/__init__.py,sha256=5-UKSiAtYocLzmQWXPzxyBnPui_c8P_r617KDwtRnNw,43
|
|
245
245
|
angr/analyses/propagator/engine_ail.py,sha256=ktZlhXS7_WPOecalGliRv5p8TeW1r6Ie18iiLtsl3wY,62565
|
|
246
246
|
angr/analyses/propagator/engine_base.py,sha256=0j5NzJ9jArF4KeysBeiPoo_RKyCvlgn-i3inSZt1cyc,1735
|
|
247
|
-
angr/analyses/propagator/engine_vex.py,sha256=
|
|
247
|
+
angr/analyses/propagator/engine_vex.py,sha256=BthcZPPizwrCfPe4P6ycZ8bNAT8YN0h5gAmR-8UqpLE,12491
|
|
248
248
|
angr/analyses/propagator/outdated_definition_walker.py,sha256=OJnI9rlyutyy2qHMTqnrnQJCXKcBHvgwHfiqlWDECiY,6890
|
|
249
249
|
angr/analyses/propagator/propagator.py,sha256=aoTheBycoH8Fa07Uy6bZYQqtjbiGe90_c6QiwVIolfI,16071
|
|
250
250
|
angr/analyses/propagator/tmpvar_finder.py,sha256=GqP1lm-_ez4AvXraDt1BQ1o7GvdjLI7j-TUL5k-lKbU,442
|
|
@@ -260,7 +260,7 @@ angr/analyses/reaching_definitions/external_codeloc.py,sha256=47DEQpj8HBSa-_TImW
|
|
|
260
260
|
angr/analyses/reaching_definitions/function_handler.py,sha256=TB6yW0TBQnTdAv3SOBcui6dSCBMoviivKx0v8COY12w,26839
|
|
261
261
|
angr/analyses/reaching_definitions/heap_allocator.py,sha256=L7LCcE-QvLd_vuc0slWmQ6X73wkYNMkUEDy1cJAV818,2634
|
|
262
262
|
angr/analyses/reaching_definitions/rd_initializer.py,sha256=w_lERfOKBrTQzsLG8ObQyeyYRlnDwUhlZVZ99SuQWb8,10323
|
|
263
|
-
angr/analyses/reaching_definitions/rd_state.py,sha256=
|
|
263
|
+
angr/analyses/reaching_definitions/rd_state.py,sha256=4HF1oi2R20EAV7uwa3iqIhurvuEye_VTgF8uzwjGtI4,23437
|
|
264
264
|
angr/analyses/reaching_definitions/reaching_definitions.py,sha256=CjW3Q7rj_fX-LQ09eACCPohXX44FT13ewWpvJQk-vr4,23163
|
|
265
265
|
angr/analyses/reaching_definitions/subject.py,sha256=GVaI1jM-Nv2MWaCjJ-Q_54nSS3hvAaZthz14AJJNq-A,1995
|
|
266
266
|
angr/analyses/typehoon/__init__.py,sha256=kCQMAuvsUKAdYFiOstBzMBCqpquJKJCQSe0CGAr2Rng,31
|
|
@@ -473,7 +473,7 @@ angr/knowledge_plugins/xrefs/__init__.py,sha256=-5A2h048WTRu6Et7q7bqlc-AyBXNuJ9A
|
|
|
473
473
|
angr/knowledge_plugins/xrefs/xref.py,sha256=w4wjDFl4xtJYOtJplp9s1AIX3wI1RE71po3ufh1M4aY,4963
|
|
474
474
|
angr/knowledge_plugins/xrefs/xref_manager.py,sha256=GYF9N1t4JxkDNGAwrVLo4_NF51P4gqiuQ21F0IbloF0,4026
|
|
475
475
|
angr/knowledge_plugins/xrefs/xref_types.py,sha256=VR3xLQQ-gUg25oX0OL3BJHyQRlZh2A8syBac9ZMS9n4,271
|
|
476
|
-
angr/lib/angr_native.dll,sha256=
|
|
476
|
+
angr/lib/angr_native.dll,sha256=KQEP6GGhkBBfIIyC2CQ_zCGSoTzT8OTGhWPjcllf6Dg,19209728
|
|
477
477
|
angr/misc/__init__.py,sha256=Ct-Q6-c-Frdz5Ihkqmou3j_1jyJi8WJXlQxs-gPQg0Y,237
|
|
478
478
|
angr/misc/ansi.py,sha256=TKrx7d_MViChHh5RBR2VLufNrujTUioJWsZS5ugk8k4,807
|
|
479
479
|
angr/misc/autoimport.py,sha256=6WT-Z6wf5NiacQhKZmR4d2bPOvNrokA7Wg0g2MUXSuw,2371
|
|
@@ -1219,7 +1219,7 @@ tests/analyses/test_cfb.py,sha256=5lV3QHvDqQlyHvtVXkxiMdL091uUM13wnzGl8n1Hakk,91
|
|
|
1219
1219
|
tests/analyses/test_class_identifier.py,sha256=UaswarpeuBDiyaEkjWng_AwxU-kg_x-ZHR0u24mNqhU,1428
|
|
1220
1220
|
tests/analyses/test_clinic.py,sha256=I1Su7BtiTPWdSf3l90vy-lHAA75_lbzdj-g_syIJlLM,743
|
|
1221
1221
|
tests/analyses/test_codetagging.py,sha256=JMTdmJuaW_rZNcg4twVWKEjs8SQKdd8J8jttBPLorQ0,1026
|
|
1222
|
-
tests/analyses/test_constantpropagation.py,sha256=
|
|
1222
|
+
tests/analyses/test_constantpropagation.py,sha256=voSC6P3Z2N2PLFrW73d9_fut4P-ODFADtSdjfoR_Ym8,3028
|
|
1223
1223
|
tests/analyses/test_ddg.py,sha256=PcCbM3VQciTO02-XkjkCJeu5wahsXyNvKyyKHja36ao,3176
|
|
1224
1224
|
tests/analyses/test_ddg_global_var_dependencies.py,sha256=Dv9ObVLuCuf8pkhUK2fL0jC--NcnVjgRj1MyG2Xggxk,3613
|
|
1225
1225
|
tests/analyses/test_ddg_memvar_addresses.py,sha256=anbiZ8s1hgu6XhDxS_zVfb43DtHQLrmNWRhLdMk1zCw,1258
|
|
@@ -1415,9 +1415,9 @@ tests/storage/test_multivalues.py,sha256=x82duiIMsU9nE-6vhm-eEsofshKfbVy5d9CNgdC
|
|
|
1415
1415
|
tests/storage/test_permissions.py,sha256=-Gsd1CUO7xZv7NTieiuikm33xfl33MyzIkembL3CuIw,883
|
|
1416
1416
|
tests/storage/test_ptmalloc.py,sha256=WwORhRoN0SYC8R9aJ_RITbVKlB6JQnLyINTWbT4PidU,10592
|
|
1417
1417
|
tests/storage/test_relro_perm.py,sha256=gqNbkYfAYr0wM-oSijS3HYi0-cbtplMDCSWQqRCqEb4,1406
|
|
1418
|
-
angr-9.2.
|
|
1419
|
-
angr-9.2.
|
|
1420
|
-
angr-9.2.
|
|
1421
|
-
angr-9.2.
|
|
1422
|
-
angr-9.2.
|
|
1423
|
-
angr-9.2.
|
|
1418
|
+
angr-9.2.81.dist-info/LICENSE,sha256=cgL_ho5B1NH8UxwtBuqThRWdjear8b7hktycaS1sz6g,1327
|
|
1419
|
+
angr-9.2.81.dist-info/METADATA,sha256=vbFFPeIgV_sbPu3RP3UYBa5BcZljPH68TXwjaDdGREY,4856
|
|
1420
|
+
angr-9.2.81.dist-info/WHEEL,sha256=6iYPr8vTHsyDK75jr9X0V3I9wPSVmtwr_8fdATBciGk,98
|
|
1421
|
+
angr-9.2.81.dist-info/entry_points.txt,sha256=Vjh1C8PMyr5dZFMnik5WkEP01Uwr2T73I3a6N32sgQU,44
|
|
1422
|
+
angr-9.2.81.dist-info/top_level.txt,sha256=EGgw8HjaUI9JWd6w70Tzkn1AcyKTMJTVJ9OpWyaOewk,11
|
|
1423
|
+
angr-9.2.81.dist-info/RECORD,,
|
|
@@ -51,9 +51,10 @@ class TestConstantpropagation(unittest.TestCase):
|
|
|
51
51
|
|
|
52
52
|
def test_register_propagation_across_calls(self):
|
|
53
53
|
call_targets = [
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
54
|
+
"syscall",
|
|
55
|
+
"call _0", # Resolved
|
|
56
|
+
"call rdi", # TOP
|
|
57
|
+
"call qword ptr [0xBAD]", # Unresolved
|
|
57
58
|
]
|
|
58
59
|
|
|
59
60
|
for target in call_targets:
|
|
@@ -63,7 +64,7 @@ class TestConstantpropagation(unittest.TestCase):
|
|
|
63
64
|
mov rcx, 0x12345678
|
|
64
65
|
mov rbp, 0xFEDCBA90
|
|
65
66
|
_11:
|
|
66
|
-
|
|
67
|
+
{target}
|
|
67
68
|
mov rax, rcx
|
|
68
69
|
mov rdi, rbp
|
|
69
70
|
ret
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|