User Tools

Site Tools


docu:csheet:sysadm:venv:docker:run_kali

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
docu:csheet:sysadm:venv:docker:run_kali [2020/03/21 23:17]
admin created
docu:csheet:sysadm:venv:docker:run_kali [2020/03/21 23:24] (current)
admin
Line 5: Line 5:
 <code bash> <code bash>
 #!/bin/bash #!/bin/bash
-docker run -it \+xhost +local: >/dev/null 2>&
 +docker run -it --rm \
  --mount type=bind,source=`pwd`/root,destination=/root \  --mount type=bind,source=`pwd`/root,destination=/root \
  --mount type=bind,source=`pwd`/etc,destination=/etc \  --mount type=bind,source=`pwd`/etc,destination=/etc \
  --mount type=bind,source=`pwd`/usr,destination=/usr \  --mount type=bind,source=`pwd`/usr,destination=/usr \
  --mount type=bind,source=`pwd`/var,destination=/var \  --mount type=bind,source=`pwd`/var,destination=/var \
- --privileged --network=host --dns=127.0.0.1 --name kali kalilinux/kali-rolling bash 2>/dev/null + --privileged --network=host kalilinux/kali-rolling bash 
-docker rm -f kali+xhost -local: >/dev/null 2>&1
 </code> </code>
 A self-destructive docker container mounting different paths from an already configured kali-linux filesystem (mounting this paths could be ommited) A self-destructive docker container mounting different paths from an already configured kali-linux filesystem (mounting this paths could be ommited)
 +\\
 +xhost (+|-)local: accepts/denies xorg connections from localhost (might be dangerous, but it works)
 \\ \\
 --privileged is needed to capture packets, use special devices, etc --privileged is needed to capture packets, use special devices, etc
 \\ \\
 --network=host speaks by itself --network=host speaks by itself
-\\ 
---dns=127.0.0.1 (totally optional) 
docu/csheet/sysadm/venv/docker/run_kali.1584832673.txt.gz · Last modified: 2020/03/21 23:17 by admin