docker安装kali及桌面

发布于 2021-12-14  1263 次阅读


docker pull kalilinux/kali-rolling

docker run -t -d -p 60000:22 -p 60001:5901 -p 60002:5902 -p 60003:5903 c4b1059cfa51

docker exec -it e5ddb4027f4c /bin/bash

ehco 'deb http://mirrors.aliyun.com/kali kali-rolling main non-free contrib' > /etc/opt/source.list

echo 'deb-src http://mirrors.aliyun.com/kali kali-rolling main non-free contrib' >> /etc/opt/source.list
apt-get update && apt-get upgrade

apt-get install kali-defaults kali-root-login desktop-base xfce4 xfce4-places-plugin xfce4-goodies

apt-get install tightvncserver

USER=root tightvncserver -depth 24 -geometry 1440x900 :1

windows用vnc连接后报错 failed to commit changes to dconf: Failed to execute child process “dbus-launch” (No such file or directory)

可能是dockerGUI程序需要X11,安装后解决,具体原因???

apt-get install x11-xserver-utils dconf-editor dbus-x11 -y

vnc连接后可以显示桌面,打开terminal报错Failed to execute child process “bash”,权限不足

docker run --privileged=true -t -d -p 60000:22 -p 60001:5901 -p 60002:5902 -p 60003:5903 c4b1059cfa51

vnc安装成功后增加源安装kali工具大概40g

一。.vim /etc/apt/sources.list
deb http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib
deb-src http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib
deb http://mirrors.ustc.edu.cn/kali kali-rolling main contrib non-free
deb-src http://mirrors.ustc.edu.cn/kali kali-rolling main contrib non-free
deb http://mirrors.ustc.edu.cn/kali-security kali-current/updates main contrib non-free
deb-src http://mirrors.ustc.edu.cn/kali-security kali-current/updates main contrib non-free

二。1.apt-get update
2.apt-get upgrade
3.apt-get install vim
4.apt-get install git
5.apt-get install python
6.apt-get install net-tools
7.apt-get install kali-linux-everything

注:

vncsever

USER=ubuntu/root vncserver -kill :1
sleep 2s
USER=ubuntu/root vncserver

docker中kali安装vnc远程访问(访问60001)
https://blog.csdn.net/kefonlo/article/details/120220610
https://cloud.tencent.com/document/product/1207/54974
出现连接成功X鼠标解决方法
https://blog.csdn.net/wyy_sunshine/article/details/41778617?utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_baidulandingword~default-0.opensearchhbase&spm=1001.2101.3001.4242.1参考网页:

1.Docker/kali桌面_kefonlo的博客-CSDN博客

2.https://www.jianshu.com/p/b2288ef3f11e

 

子夜不哭
最后更新于 2021-12-14