User Tools

Site Tools


docu:csheet:sysadm:venv:docker:run_kali

Run a process-isolated Kali Linux Rolling


Ever wondered you could run a docker container with Kali Linux in it, and still access your physical network devices, and be able to capture packets, and so on??

#!/bin/bash
xhost +local: >/dev/null 2>&1
docker run -it --rm \
	--mount type=bind,source=`pwd`/root,destination=/root \
	--mount type=bind,source=`pwd`/etc,destination=/etc \
	--mount type=bind,source=`pwd`/usr,destination=/usr \
	--mount type=bind,source=`pwd`/var,destination=/var \
	--privileged --network=host kalilinux/kali-rolling bash
xhost -local: >/dev/null 2>&1

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
–network=host speaks by itself

docu/csheet/sysadm/venv/docker/run_kali.txt · Last modified: 2020/03/21 23:24 by admin