Cannot find files that should be inside my running docker container

105 views Asked by At

I'm doing some work with the reverse engineering tool angr, and I'm trying to run it in a container. My current directory looks likes this:

ask@Garsy:~/Notes/ethHack/wetransfer-85179d/Export$ ls
angry.py                 impossible_password_location.csv  report.md
impossible_password.bin  impossible_password_strings.txt   test.txt

I then run a specific angr image like so:

ask@Garsy:~/Notes/ethHack/wetransfer-85179d/Export$ sudo docker run -it --rm -v $pwd:/local angr/angr

Where I believe that using $pwd:/local should give me acces to the before shown files inside the container (following [this][1] guide [5:40]).

I run the container, and try to write some python:

(angr) angr@38b067fffc2d:~$ ipython3
Python 3.8.5 (default, Jan 27 2021, 15:41:15) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.22.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import angr

In [2]: angr.Project("/impossible_password.bin")
---------------------------------------------------------------------------
Exception                                 Traceback (most recent call last)
<ipython-input-2-3f794a899665> in <module>
----> 1 angr.Project("/impossible_password.bin")

~/angr-dev/angr/angr/project.py in __init__(self, thing, default_analysis_mode, ignore_functions, use_sim_procedures, exclude_sim_procedures_func, exclude_sim_procedures_list, arch, simos, engine, load_options, translation_cache, support_selfmodifying_code, store_function, load_function, analyses_preset, concrete_target, **kwargs)
    124             self.loader = cle.Loader(thing, **load_options)
    125         elif not isinstance(thing, str) or not os.path.exists(thing) or not os.path.isfile(thing):
--> 126             raise Exception("Not a valid binary file: %s" % repr(thing))
    127         else:
    128             # use angr's loader, provided by cle

Exception: Not a valid binary file: '/impossible_password.bin'

where it can't find the file. Same goes for local/impossible_password.bin". How do I get the files of my current direcotry to be available when I spin up the container? [1]: https://www.youtube.com/watch?v=9dQFM5O4KFk

0

There are 0 answers