外网kali安装及java配置

安装外网kail

1.选一台外网的vps部署debian操作系统

2.更换kali源

1
2
3
4
mousepad /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

3.更新密匙

1
wget -q -O - archive.kali.org/archive-key.asc | apt-key add

之后apt-get update && apt-get full-upgrade -y

外网kail安装jdk1.8

  • 下载java压缩包

http://www.oracle.com/technetwork/java/javase/downloads/index.html

  • 移动到opt目录下并解压:
1
2
3
mv jdk-8u261-linux-x64.tar.gz /opt
cd /opt
tar -zxvf jdk-8u261-linux-x64.tar.gz
  • 复制到bin目录:
1
cp -r jdk1.8.0_261/ /usr/bin
  • 安装:
1
2
update-alternatives --install /usr/bin/java java /opt/jdk1.8.0_261/bin/java 1
update-alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_261/bin/javac 1
  • 配置:
1
2
update-alternatives --set java /opt/jdk1.8.0_261/bin/java
update-alternatives --set javac /opt/jdk1.8.0_261/bin/javac
  • 运行cobalt strike 4.1的teamserver报错:
1
2
[-] keytool is not in $PATH
install the Java Developer Kit

加一个软链即可解决

1
ln -s /usr/bin/jdk1.8.0_261/bin/keytool /usr/bin/