sensepost / dwn

d(ockerp)wn - a docker pwn tool manager
https://sensepost.com/blog/2021/dwn-a-docker-pwn-tool-manager-experiment/
GNU General Public License v3.0
156 stars 22 forks source link

Client Error: Not Found for url: http+docker://localhost/v1.41/images/dwn-network:local/json #4

Closed securestep9 closed 3 years ago

securestep9 commented 3 years ago

installed dwn in KALI Linux 2020.3 using: pip install dwn

Trying to run: dwn run ffuf

getting error:

(i) network image dwn-network:local does not exist, quickly building it
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/docker/api/client.py", line 268, in _raise_for_status
    response.raise_for_status()
  File "/usr/local/lib/python3.9/dist-packages/requests/models.py", line 943, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http+docker://localhost/v1.41/images/dwn-network:local/json

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/dwn/plan.py", line 275, in _ensure_net_exists
    self.get_client().images.get(config.net_container_name())
  File "/usr/local/lib/python3.9/dist-packages/docker/models/images.py", line 316, in get
    return self.prepare_model(self.client.api.inspect_image(name))
  File "/usr/local/lib/python3.9/dist-packages/docker/utils/decorators.py", line 19, in wrapped
    return f(self, resource_id, *args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/docker/api/image.py", line 253, in inspect_image
    return self._result(
  File "/usr/local/lib/python3.9/dist-packages/docker/api/client.py", line 274, in _result
    self._raise_for_status(response)
  File "/usr/local/lib/python3.9/dist-packages/docker/api/client.py", line 270, in _raise_for_status
    raise create_api_error_from_http_exception(e)
  File "/usr/local/lib/python3.9/dist-packages/docker/errors.py", line 31, in create_api_error_from_http_exception
    raise cls(e, response=response, explanation=explanation)
docker.errors.ImageNotFound: 404 Client Error for http+docker://localhost/v1.41/images/dwn-network:local/json: Not Found ("no such image: dwn-network:local: No such image: dwn-network:local")

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/dwn", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/dwn/cli/commands/base.py", line 77, in run
    service = plan.container.run()
  File "/usr/local/lib/python3.9/dist-packages/dwn/plan.py", line 367, in run
    self._ensure_net_exists()
  File "/usr/local/lib/python3.9/dist-packages/dwn/plan.py", line 279, in _ensure_net_exists
    _, logs = self.get_client().images.build(
  File "/usr/local/lib/python3.9/dist-packages/docker/models/images.py", line 287, in build
    raise BuildError(chunk['error'], result_stream)
docker.errors.BuildError: The command '/bin/sh -c apk add --update --no-cache           socat   && rm -rf /var/cache/apk/' returned a non-zero code: 1
leonjza commented 3 years ago

Not sure why the network image won't build. Sure you did not have Internet issues when the build ran? You can trigger the network image rebuild with dwn network build-container

I just tested on a fresh Kali with no prior config.

image

leonjza commented 3 years ago

Feel free to reopen when you have more information.