angr / angrop

BSD 2-Clause "Simplified" License
592 stars 69 forks source link

Error running simple gadgetfinder #121

Open Hooshiman opened 16 hours ago

Hooshiman commented 16 hours ago

Description

I run the code as it is said in the readme and I get this.

Traceback (most recent call last): File "/home/kali/tdde63/myenv/lib/python3.11/site-packages/angrop/gadget_finder/gadget_analyzer.py", line 65, in analyze_gadget ctrl_type = self._check_for_control_type(init_state, final_state) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/kali/tdde63/myenv/lib/python3.11/site-packages/angrop/gadget_finder/gadget_analyzer.py", line 454, in _check_for_control_type if self._check_if_stack_controls_ast(ip, init_state): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/kali/tdde63/myenv/lib/python3.11/site-packages/angrop/gadget_finder/gadget_analyzer.py", line 544, in _check_if_stack_controls_ast rop_utils.fast_unconstrained_check(initial_state, ast) File "/home/kali/tdde63/myenv/lib/python3.11/site-packages/angrop/rop_utils.py", line 114, in fast_unconstrained_check for a in ast.recursive_children_asts: ^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'BV' object has no attribute 'recursive_children_asts'

Steps to reproduce the bug

import angr, angrop p = angr.Project("/bin/ls") rop = p.analyses.ROP() rop.find_gadgets()

Environment

angr environment report

Date: 2024-10-02 05:23:27.356617 Running in virtual environment at /home/kali/tdde63/myenv Platform: linux-x86_64 Python version: 3.11.9 (main, Apr 10 2024, 13:16:36) [GCC 13.2.0] ######## angr ######### Python found it in /home/kali/tdde63/myenv/lib/python3.11/site-packages/angr/init.py Pip version 9.2.120 Couldn't find git info ######## ailment ######### Python found it in /home/kali/tdde63/myenv/lib/python3.11/site-packages/ailment/init.py Pip version 9.2.120 Couldn't find git info ######## cle ######### Python found it in /home/kali/tdde63/myenv/lib/python3.11/site-packages/cle/init.py Pip version 9.2.120 Couldn't find git info ######## pyvex ######### Python found it in /home/kali/tdde63/myenv/lib/python3.11/site-packages/pyvex/init.py Pip version 9.2.120 Couldn't find git info ######## claripy ######### Python found it in /home/kali/tdde63/myenv/lib/python3.11/site-packages/claripy/init.py Pip version 9.2.120 Couldn't find git info ######## archinfo ######### Python found it in /home/kali/tdde63/myenv/lib/python3.11/site-packages/archinfo/init.py Pip version 9.2.120 Couldn't find git info ######## z3 ######### Python found it in /home/kali/tdde63/myenv/lib/python3.11/site-packages/z3/init.py Pip version 4.13.0.0 Couldn't find git info ######## unicorn ######### Python found it in /home/kali/tdde63/myenv/lib/python3.11/site-packages/unicorn/init.py Pip version 2.0.1.post1 Couldn't find git info ######### Native Module Info ########## angr: <CDLL '/home/kali/tdde63/myenv/lib/python3.11/site-packages/angr/lib/angr_native.so', handle 3a14b80 at 0x7f95a7413bd0> unicorn: <CDLL '/home/kali/tdde63/myenv/lib/python3.11/site-packages/unicorn/lib/libunicorn.so.2', handle 3368570 at 0x7f95acf928d0> pyvex: <cffi.api._make_ffi_library..FFILibrary object at 0x7f95ab238350> z3: <CDLL '/home/kali/tdde63/myenv/lib/python3.11/site-packages/z3/lib/libz3.so', handle 2f11bd0 at 0x7f95ad21fe10>

Additional context

No response

twizmwazin commented 8 hours ago

This one is my fault, I’ll have a patch for you to test shortly

twizmwazin commented 8 hours ago

Actually this has been fixed already on master. I assume you installed via pypi and not git? I’ll post a release today.

Hooshiman commented 8 hours ago

Okey, Nice to know. I'll try from github tomorrow!

Skickat från Outlook för Androidhttps://aka.ms/AAb9ysg


From: Kevin Phoenix @.> Sent: Wednesday, October 2, 2024 7:10:20 PM To: angr/angrop @.> Cc: Felix Strömberg Hooshidar @.>; Author @.> Subject: Re: [angr/angrop] Error running simple gadgetfinder (Issue #121)

Actually this has been fixed already on master. I assume you installed via pypi and not git? I’ll post a release today.

— Reply to this email directly, view it on GitHubhttps://github.com/angr/angrop/issues/121#issuecomment-2389187628, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BHSYDXYYYJJW5BE4SI2GZ3DZZQSHZAVCNFSM6AAAAABPHIX4WGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBZGE4DONRSHA. You are receiving this because you authored the thread.Message ID: @.***>