angr / rex

Shellphish's automated exploitation engine, originally created for the Cyber Grand Challenge.
BSD 2-Clause "Simplified" License
634 stars 102 forks source link

TypeError: fire_context() got an unexpected keyword argument 'channel' #56

Closed Techno-Fox closed 2 years ago

Techno-Fox commented 4 years ago

Hello I get an error when trying to test a simple buffer overflow (to test rex). I'm trying to debug the issue.

crash = rex.Crash(tt, b"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA") WARNING | 2019-12-04 21:57:29,693 | cle.loader | The main binary is a position-independent executable. It is being loaded with a base address of 0x400000. Traceback (most recent call last): File "", line 1, in File "/opt/rex/rex/crash.py", line 119, in init self._work(pov_file, format_infos) File "/opt/rex/rex/crash.py", line 565, in _work format_infos=format_infos, File "/opt/rex/rex/crash.py", line 612, in _trace r = self.tracer_bow.fire(testcase=test_case, channel=channel, save_core=save_core) File "/usr/local/lib/python3.7/dist-packages/archr/arsenal/init.py", line 50, in fire with self.fire_context(*args, *kwargs) as flight: File "/usr/lib/python3.7/contextlib.py", line 239, in helper return _GeneratorContextManager(func, args, kwds) File "/usr/lib/python3.7/contextlib.py", line 82, in init self.gen = func(args, **kwds) TypeError: fire_context() got an unexpected keyword argument 'channel'

Techno-Fox commented 4 years ago

I get the same error running test_rex.py

$python3 test_rex.py test_arbitrary_transmit INFO | 2019-12-04 22:20:49,381 | rex.Crash | Loading rop gadgets from cache file /opt/rex/tests/binaries/tests_data/rop_gadgets_cache/arbitrary_transmit... DEBUG | 2019-12-04 22:20:49,815 | archr.targets | Running command: 'mkdir' '/tmp/tracer_target_1sg58gjp' DEBUG | 2019-12-04 22:20:49,829 | archr.targets | Running command: '/tmp/tmpe8sgfpx9/shellphish_qemu/fire' 'shellphish-qemu-cgc-tracer' '-C' '/tmp/tracer_target_1sg58gjp' '-d' 'exec' '-D' '/tmp/tracer-0t36_y79.trace' '-magicdump' '/tmp/tracer-0t36_y79.magic' '-m' '8G' '/opt/rex/tests/binaries/tests/i386/arbitrary_transmit' INFO | 2019-12-04 22:20:49,943 | archr.log | ======= Sending 36 bytes =======

INFO | 2019-12-04 22:20:49,944 | archr.log | >> AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA%

DEBUG | 2019-12-04 22:20:49,958 | archr.arsenal.qemu_tracer | Trace consists of 140 basic blocks DEBUG | 2019-12-04 22:20:49,961 | archr.targets | Running command: 'rm' '-rf' '/tmp/tracer_target_1sg58gjp' Traceback (most recent call last): File "test_rex.py", line 464, in run_all() File "test_rex.py", line 450, in run_all all_functions[f]() File "test_rex.py", line 362, in test_arbitrary_transmit _do_arbitrary_transmit_test_for("tests/i386/arbitrary_transmit") File "test_rex.py", line 344, in _do_arbitrary_transmit_test_for crash = rex.Crash(target, inp, fast_mode=True, rop_cache_path=os.path.join(cache_location, os.path.basename(binary))) File "/usr/local/lib/python3.7/dist-packages/rex-0.2-py3.7.egg/rex/crash.py", line 119, in init File "/usr/local/lib/python3.7/dist-packages/rex-0.2-py3.7.egg/rex/crash.py", line 565, in _work File "/usr/local/lib/python3.7/dist-packages/rex-0.2-py3.7.egg/rex/crash.py", line 612, in _trace File "/usr/local/lib/python3.7/dist-packages/archr/arsenal/init.py", line 50, in fire with self.fire_context(*args, *kwargs) as flight: File "/usr/lib/python3.7/contextlib.py", line 239, in helper return _GeneratorContextManager(func, args, kwds) File "/usr/lib/python3.7/contextlib.py", line 82, in init self.gen = func(args, **kwds) TypeError: fire_context() got an unexpected keyword argument 'channel'

zardus commented 4 years ago

I did a careless minor refactor of archr, and broke rex... I'll try to get some time to fix this tomorrow.

On Wed, Dec 4, 2019 at 9:21 PM KittyTechnoProgrammer < notifications@github.com> wrote:

I get the same error running test_rex.py

$python3 test_rex.py test_arbitrary_transmit INFO | 2019-12-04 22:20:49,381 | rex.Crash | Loading rop gadgets from cache file /opt/rex/tests/binaries/tests_data/rop_gadgets_cache/arbitrary_transmit... DEBUG | 2019-12-04 22:20:49,815 | archr.targets | Running command: 'mkdir' '/tmp/tracer_target_1sg58gjp' DEBUG | 2019-12-04 22:20:49,829 | archr.targets | Running command: '/tmp/tmpe8sgfpx9/shellphish_qemu/fire' 'shellphish-qemu-cgc-tracer' '-C' '/tmp/tracer_target_1sg58gjp' '-d' 'exec' '-D' '/tmp/tracer-0t36_y79.trace' '-magicdump' '/tmp/tracer-0t36_y79.magic' '-m' '8G' '/opt/rex/tests/binaries/tests/i386/arbitrary_transmit' INFO | 2019-12-04 22:20:49,943 | archr.log | ======= Sending 36 bytes

INFO | 2019-12-04 22:20:49,944 | archr.log | >> AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA%

DEBUG | 2019-12-04 22:20:49,958 | archr.arsenal.qemu_tracer | Trace consists of 140 basic blocks DEBUG | 2019-12-04 22:20:49,961 | archr.targets | Running command: 'rm' '-rf' '/tmp/tracer_target_1sg58gjp' Traceback (most recent call last): File "test_rex.py", line 464, in run_all() File "test_rex.py", line 450, in run_all all_functionsf File "test_rex.py", line 362, in test_arbitrary_transmit _do_arbitrary_transmit_test_for("tests/i386/arbitrary_transmit") File "test_rex.py", line 344, in _do_arbitrary_transmit_test_for crash = rex.Crash(target, inp, fast_mode=True, rop_cache_path=os.path.join(cache_location, os.path.basename(binary))) File "/usr/local/lib/python3.7/dist-packages/rex-0.2-py3.7.egg/rex/crash.py", line 119, in init File "/usr/local/lib/python3.7/dist-packages/rex-0.2-py3.7.egg/rex/crash.py", line 565, in _work File "/usr/local/lib/python3.7/dist-packages/rex-0.2-py3.7.egg/rex/crash.py", line 612, in _trace File "/usr/local/lib/python3.7/dist-packages/archr/arsenal/init.py", line 50, in fire with self.fire_context(*args, *kwargs) as flight: File "/usr/lib/python3.7/contextlib.py", line 239, in helper return _GeneratorContextManager(func, args, kwds) File "/usr/lib/python3.7/contextlib.py", line 82, in init self.gen = func(args, **kwds) TypeError: fire_context() got an unexpected keyword argument 'channel'

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/shellphish/rex/issues/56?email_source=notifications&email_token=AA2LHFZLKJB6NH75KANEIEDQXB6VTA5CNFSM4JVTU4FKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEF7NZCI#issuecomment-561962121, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2LHF73GEBJDTW4GRWX4N3QXB6VTANCNFSM4JVTU4FA .

Techno-Fox commented 4 years ago

Thank you for responding. Also thank you for telling me the reason. I was giving myself an anerism trying to find out what was wrong. Thank you for promising to take time to fix it. If you could please report back when you have fixed this error so I can test it please. Thank you, have a nice day, and good luck.

Techno-Fox commented 4 years ago

How's it going with rex?

github-actions[bot] commented 2 years ago

This issue has been marked as stale because it has no recent activity. Please comment or add the pinned tag to prevent this issue from being closed.

github-actions[bot] commented 2 years ago

This issue has been closed due to inactivity.