본문 바로가기

카테고리 없음

Kali linux 초기설정

<고정 IP 설정>

vi /etc/network/interfaces

auto eth0
iface eth0 inet static
address 192.168.44.102/24
gateway 192.168.44.2

sudo systemctl restart networking.service

<SSH Server 설정>

apt install openssh-server

systemctl start ssh.socket
systemctl enable ssh.service

 

<vmware 공유폴더 설정>

1. mount 스크립트 생성하기

cat <<EOF | sudo tee /usr/local/sbin/mount-shared-folders
#!/bin/sh
vmware-hgfsclient | while read folder; do
  vmwpath="/mnt/hgfs/\${folder}"
  echo "[i] Mounting \${folder}   (\${vmwpath})"
  sudo mkdir -p "\${vmwpath}"
  sudo umount -f "\${vmwpath}" 2>/dev/null
  sudo vmhgfs-fuse -o allow_other -o auto_unmount ".host:/\${folder}" "\${vmwpath}"
done
sleep 2s
EOF
sudo chmod +x /usr/local/sbin/mount-shared-folders
ln -sf /usr/local/sbin/mount-shared-folders ~/Desktop/mount-shared-folders

2. 스크립트 실행

$ ~/Desktop/mount-shared-folders

<vmware-tools 재시작>

1. 재시작 스크립트 생성

cat <<EOF | sudo tee /usr/local/sbin/restart-vm-tools
#!/bin/sh
systemctl stop run-vmblock\\\\x2dfuse.mount
sudo killall -q -w vmtoolsd
systemctl start run-vmblock\\\\x2dfuse.mount
systemctl enable run-vmblock\\\\x2dfuse.mount
sudo vmware-user-suid-wrapper vmtoolsd -n vmusr 2>/dev/null
sudo vmtoolsd -b /var/run/vmroot 2>/dev/null
EOF
sudo chmod +x /usr/local/sbin/restart-vm-tools
ln -sf /usr/local/sbin/restart-vm-tools ~/Desktop/restart-vm-tools

 

2. 재시작 스크립트 실행

$  ~/Desktop/restart-vm-tools