目录
- 下载固件和烧录系统
- 第一次开机
- SSH连接
- 换源
- 设置语言
- 安装VNC
平台:树莓派3B
版本: Linux kali 5.4.83-Re4son-v7+ #1 SMP Sat May 15 03:22:58 UTC 2021 armv7l GNU/Linux
下载固件和烧录系统
Get Kali
格式化TF卡
使用Win32DiskImager刷入镜像
第一次开机
将TF卡插入树莓派,接入其它外设
初始账户为kali 密码为kali
连接Wifi
SSH连接
查看kali的LAN IP
连接
成功连接
换源
sudo nano /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.aliyun.com/kali kali-rolling main non-free contrib
deb-src http://mirrors.aliyun.com/kali kali-rolling main non-free contrib
#清华大学
deb http://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling main contrib non-free
sudo apt-get update
设置语言
sudo dpkg-reconfigure locales
空格选择
en-US.UTF-8 UTF-8
zh_CN.GB2312
zh_CN.GB18030 GB18030
zh_CN.GBK GBK
zh_CN.UTF-8 UTF-8
Tab到Ok回车
回车选择zh_CN.UTF-8
重启
sudo reboot -i
重启后提示将标准文件夹更新到当前语言,建议选择保留旧的名称
安装VNC
安装x11vnc
sudo apt-get install -y x11vnc
设置密码文件
x11vnc -storepasswd
测试
x11vnc -rfbauth /home/kali/.vnc/passwd -display :0 -forever -bg -repeat -nowf -o /home/kali/.vnc/x11vnc.log -shared &
使用VNC-Viewer已可成功连接
配置开机自启动
sudo nano /lib/systemd/system/x11vnc.service
[Unit]
Description=Start x11vnc at startup.
After=multi-user.target[Service]
Type=simple
ExecStart=/usr/bin/x11vnc -auth guess -once -loop -noxdamage -repeat -rfbauth /home/kali/.vnc/passwd -shared[Install]
WantedBy=multi-user.target
启动服务
sudo systemctl daemon-reload
sudo systemctl enable x11vnc.service
sudo systemctl start x11vnc.service
再次重启可发现vnc已成功自启动
sudo reboot -i
安装虚拟显示器服务以应对无屏幕的情况
sudo apt-get install xserver-xorg-core
sudo apt-get install xserver-xorg-video-dummy
查找安装位置
sudo find / -name "xorg.conf.d"
修改/创建配置文件
sudo nano /etc/X11/xorg.conf.d/xorg.conf
Section "Device"Identifier "Configured Video Device"Driver "dummy"
EndSectionSection "Monitor"Identifier "Configured Monitor"HorizSync 31.5-48.5VertRefresh 50-70
EndSectionSection "Screen"Identifier "Default Screen"Monitor "Configured Monitor"Device "Configured Video Device"DefaultDepth 24SubSection "Display"Depth 24Modes "1280x720"EndSubSection
EndSection
拔掉屏幕重启
sudo reboot -i
可见vnc服务已成功自启动