vagd.virts.dogd
Classes
Module Contents
- class vagd.virts.dogd.Dogd(binary: str, image: str = DEFAULT_IMAGE, user: str = DEFAULT_USER, forward: Dict[str, int] = None, packages: List[str] = None, symbols=True, rm=True, ex: bool = False, fast: bool = False, alpine: bool = False, **kwargs)
Bases:
vagd.virts.shgd.Shgd
Docker virtualization for pwntools- Parameters:
binary – binary to execute
image – docker base image
user – name of user on docker container
forward – Dictionary of forwarded ports, needs to follow docker api format: ‘hostport/(tcp|udp)’ : guestport
packages – packages to install on the container
symbols – additionally install libc6 debug symbols (also updates libc6)
ex – if experimental features, e.g. alpine, gdbserver should be enabled
rm – remove container after exit
alpine – if the conainter is alpine (also autochecks image name)
fast – mounts libs locally for faster symbol extraction (experimental) NOT COMPATIBLE WITH ALPINE
kwargs – parameters to pass through to super
SSH from cmdvagd ssh # or ssh -o "StrictHostKeyChecking=no" -i ~/.share/local/vagd/keyfile -p $(cut .vagd/docker.lock -d":" -f 2) vagd@0.0.0.0
connect with docker execdocker exec -it $(cut ./.vagd/docker.lock -d":" -f 1) /bin/bash
Kill from cmd:vagd clean #or docker kill $(cut ./.vagd/docker.lock -d":" -f 1)
Docker containers are automatically removed after they stopDocker images need to be manually removed from dockerDockerfiles are stored in home directory to allow caching ~/.share/local/vagd/docker/<image>/Dockerfiledocker images # list images docker rmi <id> # remove correct image
- _image: str
- _name: str
- _user: str
- _port: int
- _packages: List[str]
- _client: docker.client
- _id: str
- _dockerdir: str
- _dockerfile: str
- _isalpine: bool
- _gdbsrvport: int
- _rm: bool
- _ex: bool
- _forward: Dict[str, int]
- _symbols: bool
- VAGD_PREFIX = 'vagd-'
- TYPE = 'dogd'
- DOCKERHOME
- DEFAULT_USER = 'vagd'
- DEFAULT_PORT = 2222
- DEFAULT_IMAGE
- DEFAULT_PACKAGES
- LOCKFILE
- _create_dockerfile()
- _create_docker_instance()
- _build_image()
- _vm_create()
- _vm_setup() None
pass