Kali Linux渗透测试系统初始化设置指南

2015-06-08 40,009

Kali Linux是什么就不再过多介绍,大家可以自行上百度、谷歌了解。上次安装Kali系统时分的20G虚拟硬盘现在已经不够用了,导致系统无法启动,而笔者也没有备份和克隆,所以不得不重装Kali系统。想着把自己重装kali系统后安装的一些软件及设置做一个简单记录,也方便日后查找 。(本地测试环境:Windows 7 x64 + VirtualBox 4.3.12 + Kali 1.0.9a i386)

目 录 - CONTENTS

1.Kali Linux安装VirtualBox增强功能                                             9.Kali Linux安装google chrome浏览器
2.Kali Linux配置共享文件夹和剪贴板                                           10.Kali Linux安装Iceweasel浏览器语言包
3.Kali Linux修改计算机系统主机名                                              11.Kali Linux安装Flash Player播放插件
4.Kali Linux更换为中科大的更新源                                              12.Kali LinuxPPA安装Fcitx中文输入法
5.Kali Linux解决系统启动没声音问题                                           13.Kali Linux设置Ssh服务开机自启动
6.Kali Linux恢复桌面回收站的图标                                              14.Kali Linux设置Msf服务开机自启动
7.Kali Linux修复VPN连接客户端                                                 15.Kali Linux KEYEXPIRED 1425567400
8.Kali Linux系统启动为静态IP地址                                              16.Kali VirtualBox增强功能失效解决方法

1.Kali Linux安装VirtualBox增强功能

VirtualBox增强功能介绍:物理机与虚拟机之间的文件共享。物理机与虚拟机之间的剪切板共享。虚拟机的direct3D支持,这样虚拟机窗口就可以随便放大或缩小了...... 。

01.启动 Kali Linux 系统->菜单栏选择“设备”->“安装增强功能”快捷键(右 Ctrl+D),提示是否自动运行,点击取消 。
02.在桌面双击光盘图标(增强工具),拷贝“VBoxlinuxAdditions.run”文件到 root 根目录,给予这个文件(读写)权限 。
03.先在Kali Linux终端命令行下安装Linux内核头文件,然后再运行“VBoxlinuxAdditions.run”文件执行安装...... 。

root@kali:~# cp /media/cdrom/VBoxLinuxAdditions.run /root/
root@kali:~# apt-get update && apt-get install -y linux-headers-$(uname -r)
root@kali:~# chmod 755 VBoxLinuxAdditions.run
root@kali:~# ./VBoxLinuxAdditions.run

Kali_Linux_1

注:如不安装Linux内核头文件可能出现:Enter the path to the kernel header files for the 3.14-kali1-686-pae kernel?

2.Kali Linux 配置共享文件夹和剪贴板

VirtualBox不能像Vmware直接安装Vmware Tools就可以实现虚拟机与物理机的文件共享,VirtualBox需要设置才能实现。

01.在VirtualBox选中“Kali 1.0.9”系统->“设置(S)”->“共享文件夹”->“添加一个新的文件夹定义”,在物理机上选择要共享的文件夹,然后把“自动挂载(A)”、“固定分配(M)”钩上,点击确定 。

Kali_Linux_2Kali_Linux_3

02.设置完文件夹共享后,然后切换到“常规”->“高级(A)”->“共享粘贴板(S)”、“拖放(D)”下拉框中选择“双向”,点击确定 。注:VirtualBox“拖放”功能暂只支持“物理机->虚拟机”拖放文件。共享文件夹会自动挂载在/media目录下。

Kali_Linux_4Kali_Linux_5

 

3.Kali Linux修改计算机系统主机名

修改系统主机名并无实际用途,可以修改为随意主机名称(网络常用ID,英文名等......)。hosts 、hostname这俩个文件都是需要修改的,可以使用gedit、vim、nano编辑器修改(根据个人习惯)。hosts文件每行分3个域: IP 主机名 别名 。

/etc/hosts /etc/hosts /etc/hostname /etc/hostname
127.0.0.1 localhost
127.0.1.1 kali.xxoo kali
......
127.0.0.1 localhost
127.0.1.1 kali.xxoo c2unix
......
kali c2unix

Kali_Linux_6

注:Linux里很多命令都会用到gethostbyname()这个函数,如果hosts文件里没有修改,那么多个命令是无法执行的 。

4.Kali Linux更换为中科大的更新源

Kali Linux使用官网的更新源,我们在国内下载、更新速度很慢 。所以建议大家使用“中科大”的更新源,速度很好且稳定,大家没事也可以测试下其它的更新源 。打开/etc/apt/sources.list并添加“中科大”更新源 。添加好中科大源后对源、软件包进行整体更新:apt-get update && apt-get upgrade(速度能达到1M+/S)。

# deb cdrom:[Debian GNU/Linux 7.0 _Kali_ - Official Snapshot i386 LIVE/INSTALL Binary 20141002-12:53]/ kali contrib main non-free
# deb cdrom:[Debian GNU/Linux 7.0 _Kali_ - Official Snapshot i386 LIVE/INSTALL Binary 20141002-12:53]/ kali contrib main non-free

## Kali官方更新源
# deb http://http.kali.org/kali kali main non-free contrib
# deb-src http://http.kali.org/kali kali main non-free contrib
# deb http://security.kali.org/kali-security kali/updates main contrib non-free

## Kali中科大更新源
deb http://mirrors.ustc.edu.cn/kali kali main non-free contrib
deb-src http://mirrors.ustc.edu.cn/kali kali main non-free contrib	
deb http://mirrors.ustc.edu.cn/kali-security kali/updates main contrib non-free

5.Kali Linux解决系统启动没声音问题

01.进入Kali Linux系统后声音选项默认是静音或禁用的,然后使用以下命令安装相关软件包,重启即可 。
02.右上脚声音图标右键->“声音首选项(S)”->“声音效果”选择一个警告声音(根据自己喜好选择),完成 。

root@c2unix:~# sudo apt-get install alsa-base alsa-utils alsa-oss alsa-tools alsa-tools-gui alsa-utils
root@c2unix:~# reboot

6.Kali Linux解决系统启动没声音问题

在终端命令行下打开dconf-editor程序(类似Windows regedit)或(应用程序->系统工具->dconf-editor),然后找到:

org > gnome > nautilus > desktop -> trash-icon-visible(打钩)

Kali_Linux_7

7.Kali Linux修复VPN连接客户端

Kali Linux系统默认的VPN客户端是无法直接使用的,鼠标放在“添加”按钮上会提示:无可用VPN插件,请至少安装一个以启用此按钮 。使用以下命令安装相关软件包,安装完后就可以看到可以正常添加VPN连接了 。

root@c2unix:~# apt-get install pptpd network-manager-openvpn network-manager-openvpn-gnome network-manager-pptp network-manager-pptp-gnome network-manager-strongswan network-manager-vpnc network-manager-vpnc-gnome

Kali_Linux_8

8.Kali Linux系统启动为静态IP地址

笔者在渗透测试过程中经常会用到Metpasploit,如果不是静态IP而是DHCP分配的IP,在每次用Metasploit渗透时都需要在路由器里修改转发规则,个人感觉比较麻烦(懒)。

01.打开/etc/network/interfaces文件,将底部的iface eth0 inetdhcp改为iface eth0 inet static,allow-hotplug eth0改为auto eth0,添加address(IP地址)、netmask(子网掩码)、gateway(网关),具体请参照下表进行修改 。
02.打开/etc/resolv.conf文件,设置首选DNS、备用DNS(当地DNS,也可用114 DNS、Google DNS等公共DNS)。
03.终端命令行下重启网络:service networking restart或 /etc/init.d/networking restart 。

/etc/network/interfaces /etc/resolv.conf
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).# The loopback network interface
auto lo
iface lo inet loopback# The primary network interface
auto eth0
iface eth0 inet static # static表示使用固定ip,dhcp表示使用动态ip
address 192.168.1.10 # 设置ip地址:192.168.1.10
netmask 255.255.255.0 # 设置子网掩码:255.255.255.0
gateway 192.168.1.1 # 设置网关:192.168.1.1
nameserver 114.114.114.114
# 设置首选DNS
nameserver 8.8.8.8
# 设置备用DNS

注1:修改/etc/network/interfaces(网卡配置文件)、/etc/resolv.conf(DNS配置文件)请先做好备份,以免出问题 。
注2:# The loopback network interface这处内容不能删除或注释掉,否则即使能上网,也能获取到IP地址,但是ping不通本地127.0.0.1地址导致postgresql等服务不能正常启动,Metasploit启动时也会提示错误信息 。
注3:设置静态IP地址可能导致VPN连接无反应,这时请将 # The primary network interface这处所有内容用#注释掉,然后使用service networking restart命令重启网络或reboot命令重启计算机 。

Kali_Linux_9

9.Kali Linux安装google chrome浏览器

Google公司开发的网页浏览器。该浏览器是基于其他开放原始码软件所撰写,包括WebKit和Mozilla,目标是提升稳定性、速度和安全性,并创造出简单且有效率的使用者界面 。Google Chrome支持跨平台使用(Windows + Linux)。

注:笔者在安装过程中出错了:未安装软件包 libappindicator1 ......,根据每一步的出错信息即可解决该问题 。

官网下载地址:https://www.google.com/intl/en/chrome/browser/?platform=linux (可能需要翻墙!)

root@c2unix:~# wget https://dl.google.com/linux/direct/google-chrome-stable_current_i386.deb /root/
root@c2unix:~# wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb /root/
root@c2unix:~# dpkg -i google-chrome-stable_current_i386.deb
Selecting previously unselected package google-chrome-stable.
(正在读取数据库 ... 系统当前共安装有 332509 个文件和目录。)
正在解压缩 google-chrome-stable (从 google-chrome-stable_current_i386.deb) ...
dpkg: dependency problems prevent configuration of google-chrome-stable:
 google-chrome-stable 依赖于 libappindicator1;然而:
  未安装软件包 libappindicator1。

dpkg: error processing google-chrome-stable (--install):
 依赖关系问题 - 仍未被配置
正在处理用于 desktop-file-utils 的触发器...
正在处理用于 gnome-menus 的触发器...
正在处理用于 man-db 的触发器...
正在处理用于 menu 的触发器...
在处理时有错误发生:
 google-chrome-stable
root@c2unix:~# apt-get install libappindicator1
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
您可能需要运行“apt-get -f install”来纠正下列错误:
下列软件包有未满足的依赖关系:
 libappindicator1 : 依赖: libdbusmenu-glib4 (>= 0.4.2) 但是它将不会被安装
                    依赖: libdbusmenu-gtk4 (>= 0.4.2) 但是它将不会被安装
                    依赖: libindicator7 (>= 0.4.90) 但是它将不会被安装
                    推荐: indicator-application (>= 0.2.93) 但是它将不会被安装
E: 有未能满足的依赖关系。请尝试不指明软件包的名字来运行“apt-get -f install”(也可以指定一个解决办法)。
root@c2unix:~# apt-get -f install 
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
正在更正依赖关系... 完成
将会安装下列额外的软件包:
  indicator-application libappindicator1 libappindicator3-1 libdbusmenu-glib4
  libdbusmenu-gtk3-4 libdbusmenu-gtk4 libindicator3-7 libindicator7
下列【新】软件包将被安装:
  indicator-application libappindicator1 libappindicator3-1 libdbusmenu-glib4
  libdbusmenu-gtk3-4 libdbusmenu-gtk4 libindicator3-7 libindicator7
升级了 0 个软件包,新安装了 8 个软件包,要卸载 0 个软件包,有 2 个软件包未被升级。
有 1 个软件包没有被完全安装或卸载。
需要下载 582 kB 的软件包。
解压缩后会消耗掉 1,184 kB 的额外空间。
您希望继续执行吗?[Y/n]y
获取:1 http://mirrors.ustc.edu.cn/kali/ kali/main libdbusmenu-glib4 i386 0.6.2-1 [109 kB]
获取:2 http://mirrors.ustc.edu.cn/kali/ kali/main libdbusmenu-gtk4 i386 0.6.2-1 [94.5 kB]
获取:3 http://mirrors.ustc.edu.cn/kali/ kali/main libindicator7 i386 0.5.0-1 [55.7 kB]
获取:4 http://mirrors.ustc.edu.cn/kali/ kali/main libappindicator1 i386 0.4.92-2 [55.6 kB]
获取:5 http://mirrors.ustc.edu.cn/kali/ kali/main libdbusmenu-gtk3-4 i386 0.6.2-1 [94.7 kB]
获取:6 http://mirrors.ustc.edu.cn/kali/ kali/main libindicator3-7 i386 0.5.0-1 [55.7 kB]
获取:7 http://mirrors.ustc.edu.cn/kali/ kali/main libappindicator3-1 i386 0.4.92-2 [55.6 kB]
获取:8 http://mirrors.ustc.edu.cn/kali/ kali/main indicator-application i386 0.5.0-1 [61.6 kB]
下载 582 kB,耗时 1秒 (426 kB/s)                 
Selecting previously unselected package libdbusmenu-glib4:i386.
(正在读取数据库 ... 系统当前共安装有 332614 个文件和目录。)
正在解压缩 libdbusmenu-glib4:i386 (从 .../libdbusmenu-glib4_0.6.2-1_i386.deb) ...
Selecting previously unselected package libdbusmenu-gtk4:i386.
正在解压缩 libdbusmenu-gtk4:i386 (从 .../libdbusmenu-gtk4_0.6.2-1_i386.deb) ...
Selecting previously unselected package libindicator7.
正在解压缩 libindicator7 (从 .../libindicator7_0.5.0-1_i386.deb) ...
Selecting previously unselected package libappindicator1.
正在解压缩 libappindicator1 (从 .../libappindicator1_0.4.92-2_i386.deb) ...
Selecting previously unselected package libdbusmenu-gtk3-4:i386.
正在解压缩 libdbusmenu-gtk3-4:i386 (从 .../libdbusmenu-gtk3-4_0.6.2-1_i386.deb) ...
Selecting previously unselected package libindicator3-7.
正在解压缩 libindicator3-7 (从 .../libindicator3-7_0.5.0-1_i386.deb) ...
Selecting previously unselected package libappindicator3-1.
正在解压缩 libappindicator3-1 (从 .../libappindicator3-1_0.4.92-2_i386.deb) ...
Selecting previously unselected package indicator-application.
正在解压缩 indicator-application (从 .../indicator-application_0.5.0-1_i386.deb) ...
正在设置 libdbusmenu-glib4:i386 (0.6.2-1) ...
正在设置 libdbusmenu-gtk4:i386 (0.6.2-1) ...
正在设置 libindicator7 (0.5.0-1) ...
正在设置 libappindicator1 (0.4.92-2) ...
正在设置 google-chrome-stable (38.0.2125.111-1) ...
update-alternatives: using /usr/bin/google-chrome-stable to provide /usr/bin/x-www-browser (x-www-browser) in 自动模式
update-alternatives: using /usr/bin/google-chrome-stable to provide /usr/bin/gnome-www-browser (gnome-www-browser) in 自动模式
update-alternatives: using /usr/bin/google-chrome-stable to provide /usr/bin/google-chrome (google-chrome) in 自动模式
正在设置 libdbusmenu-gtk3-4:i386 (0.6.2-1) ...
正在设置 libindicator3-7 (0.5.0-1) ...
正在设置 libappindicator3-1 (0.4.92-2) ...
正在设置 indicator-application (0.5.0-1) ...
正在处理用于 menu 的触发器...
root@c2unix:~# dpkg -i google-chrome-stable_current_i386.deb
(正在读取数据库 ... 系统当前共安装有 332682 个文件和目录。)
正预备替换 google-chrome-stable 38.0.2125.111-1 (使用 google-chrome-stable_current_i386.deb) ...
正在解压缩将用于更替的包文件 google-chrome-stable ...
正在设置 google-chrome-stable (38.0.2125.111-1) ...
正在处理用于 desktop-file-utils 的触发器...
正在处理用于 gnome-menus 的触发器...
正在处理用于 man-db 的触发器...
正在处理用于 menu 的触发器...

01. 虽然Google Chrome安装好了,但直接打开会提示信息:您必须为个人资料信息的存储指定其他的“--user-data-dir”
02. 打开“/usr/bin/google-chrome”文件,底部找到“exec”,参照下图修改(--user-data-dir - 指定用户数据目录)。

Kali_Linux_10Kali_Linux_11

10.Kali Linux安装Iceweasel浏览器语言包

0.1 在终端命令行下安装iceweasel-l10n-zh-cn中文语言包,安装完成后重启Iceweasel浏览器就可以看到中文界面了 。

root@c2unix:~# apt-get install iceweasel-l10n-zh-cn

Kali_Linux_12

11.Kali Linux安装Flash Player播放插件

Google Chrome浏览器默认自带了Flash Player插件,而Iceweasel浏览器默认是没有的,需要我们自行安装 。如果没有安装的话,使用Iceweasel浏览器访问Youku,Tudou,Letv时可能无法播放视频,音乐等 。

root@c2unix:~# apt-get install flashplugin-nonfree && update-flashplugin-nonfree --install
正在读取软件包列表... 完成
......
建议安装的软件包:
  konqueror-nsplugins ttf-mscorefonts-installer ttf-xfree86-nonfree
  flashplugin-nonfree-extrasound
......

12.Kali LinuxPPA安装Fcitx中文输入法

01.首先添加Fcitx的nightlyPPA,在“/etc/apt/sources.list”源文件中添加nightly源,然后进行更新 。
注:在更新过程中可能会出现“GPG错误”问题,这时可以自己手动添加公匙来解决 。

deb http://ppa.launchpad.net/fcitx-team/nightly/ubuntu quantal main
deb-src http://ppa.launchpad.net/fcitx-team/nightly/ubuntu quantal main
root@c2unix:~# apt-get update
获取:1 http://ppa.launchpad.net quantal Release.gpg [316 B]
获取:2 http://ppa.launchpad.net quantal Release [11.9 kB]
忽略 http://ppa.launchpad.net quantal Release
获取:3 http://ppa.launchpad.net quantal/main Sources [9,201 B]
获取:4 http://ppa.launchpad.net quantal/main i386 Packages [19.6 kB]   
忽略 http://ppa.launchpad.net quantal/main Translation-zh_CN
忽略 http://ppa.launchpad.net quantal/main Translation-zh
忽略 http://ppa.launchpad.net quantal/main Translation-en
下载 41.0 kB,耗时 10秒 (4,063 B/s)                                                            
正在读取软件包列表... 完成
W: GPG 错误:http://ppa.launchpad.net quantal Release: 由于没有公钥,无法验证下列签名: NO_PUBKEY 6ADC9FEC7E5FA1EE
root@c2unix:~# gpg --keyserver keyserver.ubuntu.com --recv 6ADC9FEC7E5FA1EE
root@c2unix:~# gpg --export --armor 7E5FA1EE | sudo apt-key add -

Kali_Linux_13

02.安装Fcitx,Sunpinyin输入法,Google输入法 。安装完成后重启一下系统使设置生效 。

root@c2unix:~# apt-get install fcitx fcitx-config-gtk fcitx-sunpinyin fcitx-googlepinyin fcitx-module-cloudpinyin
root@c2unix:~# apt-get install fcitx-table-all
root@c2unix:~# reboot

13.Kali Linux设置Ssh服务开机自启动

SSH是安全的数据通信,远程命令行登录,远程命令执行,以及两个联网的计算机之间的其他安全网络服务的加密的网络协议。它连接,通过在不安全网络上的安全通道,在服务器和客户机上运行的ssh服务器和ssh客户端程序 。

01.Kali Linux默认已安装openssh-server,使用chkconfig -l ssh或chkconfig -l查看SSH或全部服务开放情况 。
注:Kali Linux默认没安装chkconfig(自行安装)。chkconfig(类似Windows services.msc)。service ssh status 。

root@c2unix:~# service ssh start

Kali_Linux_14

02.让Kali Linux的SSH服务开机自启动,在终端命令行输入并执行以下命令,然后再使用chkconfig命令查看SSH服务。

root@c2unix:~# update-rc.d -f ssh remove && update-rc.d -f ssh defaults
update-rc.d: using dependency based boot sequencing
update-rc.d: using dependency based boot sequencing
update-rc.d: warning: default stop runlevel arguments (0 1 6) do not match ssh Default-Stop values (none)

Kali_Linux_15

03.将Kali Linux默认SSH密匙移到一个新的文件夹中,然后重新生成SSH密匙,再使用md5sum对密匙进行校验 。

root@c2unix:~# cd /etc/ssh/
root@c2unix:/etc/ssh# mkdir default_kali_1.0.9_keys
root@c2unix:/etc/ssh# mv ssh_host_* default_kali_1.0.9_keys/
root@c2unix:/etc/ssh# dpkg-reconfigure openssh-server
Creating SSH2 RSA key; this may take some time ...
Creating SSH2 DSA key; this may take some time ...
Creating SSH2 ECDSA key; this may take some time ...
[ ok ] Restarting OpenBSD Secure Shell server: sshd.
root@c2unix:/etc/ssh# md5sum ssh_host_*
4f1fbf1638a7dca5b84f82efdea9a7ec  ssh_host_dsa_key
ca9ebe95049c585e49a1a1c826c59366  ssh_host_dsa_key.pub
8e55f9ec8386d9f9a4630cb1f34c3b57  ssh_host_ecdsa_key
fd16683fb94257d8d88dbdd0af1e0197  ssh_host_ecdsa_key.pub
6f2bb0e52d53e8766c06a8cfbe9f9678  ssh_host_rsa_key
7ea1426c0b0a07d276a7c17f4ce17fe8  ssh_host_rsa_key.pub
root@c2unix:/etc/ssh# cd default_kali_1.0.9_keys/
root@c2unix:/etc/ssh/default_kali_1.0.9_keys# md5sum *
1bf3bfe9c3185f605da57a802c792233  ssh_host_dsa_key
6a1e85f520e352ba826d77bdb31ce053  ssh_host_dsa_key.pub
bd052fe505e00af0ec59f930003fa58a  ssh_host_ecdsa_key
5db5535dfb15632d4dd5d1bd4600455d  ssh_host_ecdsa_key.pub
dfa3477080dde37c674b2e29fe7c07a1  ssh_host_rsa_key
e15d590ae75f082c4def1a59a17ad947  ssh_host_rsa_key.pub

Kali_Linux_16

04.设置Kali Linux SSH MOTD编辑:/etc/motd(http://patorjk.com/software/taag/#p=display&f=Standard&t=)。

14.Kali Linux设置Msf服务开机自启动

Kali Linux渗透测试系统中的metpasploit工具相关服务(postgresql,metasploit)默认是不开启的,我们需要手动开启并设置为自启动 。在不开启postgresql服务使用msfconsole命令启动metasploit会出现以下提示,可以使用db_status命令查看数据库连接状态,如果在数据库未连接状态下使用metasploit不会生成保存渗透测试数据所需数据表 。

root@c2unix:~# msfconsole
[*] Starting the Metasploit Framework console.../
[-] Failed to connect to the database: could not connect to server: Connection refused
	Is the server running on host "localhost" (::1) and accepting
	TCP/IP connections on port 5432?
could not connect to server: Connection refused
	Is the server running on host "localhost" (127.0.0.1) and accepting
	TCP/IP connections on port 5432?
......
msf > db_status 
[*] postgresql selected, no connection

01.开启metasploit工具的postgresql,metasploit服务并设为自启动,在终端命令行输入并执行以下命令,然后再使用chkconfig命令查看postgresql,metasploit服务,重启系统 。start(启动),restart(重新启动),stop(停止),status(状态)。

root@c2unix:~# service postgresql start
[ ok ] Starting PostgreSQL 9.1 database server: main.
root@c2unix:~# service metasploit start
[ ok ] Starting Metasploit rpc server: prosvc.
[ ok ] Starting Metasploit web server: thin.
[ ok ] Starting Metasploit worker: worker.
root@c2unix:~# service postgresql status
Running clusters: 9.1/main 
root@c2unix:~# service metasploit status
[ ok ] Metasploit rpc server is running.
[ ok ] Metasploit web server is running.
[ ok ] Metasploit worker is running.
root@c2unix:~# update-rc.d -f postgresql remove && update-rc.d -f postgresql defaults
update-rc.d: using dependency based boot sequencing
update-rc.d: using dependency based boot sequencing
root@c2unix:~# update-rc.d -f metasploit remove && update-rc.d -f metasploit defaults
update-rc.d: using dependency based boot sequencing
update-rc.d: using dependency based boot sequencing
root@c2unix:~# reboot

Kali_Linux_17

root@c2unix:~# msfconsole
[*] Starting the Metasploit Framework console...|

  Metasploit Park, System Security Interface
  Version 4.0.5, Alpha E

Trouble managing data? List, sort, group, tag and search your pentest data
in Metasploit Pro -- learn more on http://rapid7.com/metasploit

       =[ metasploit v4.10.2-2014111901 [core:4.10.2.pre.2014111901 api:1.0.0]]
+ -- --=[ 1379 exploits - 850 auxiliary - 233 post        ]
+ -- --=[ 340 payloads - 37 encoders - 8 nops             ]
+ -- --=[ Free Metasploit Pro trial: http://r-7.co/trymsp ]

msf > db_status
[*] postgresql connected to msf3

15.Kali Linux KEYEXPIRED 1425567400

问题描述:Kali Linux系统由于太长时间没有更新,而会出现GPG错误 KEYEXPIRED 1425567400。经检查更新源未出现问题,可以正常解析,deb也不冲突,就是密钥过期了。

Kali_Linux_18

解决方法:使用apt-key命令添加新的密钥进入apt-keyring,然后就可以执行“apt-get update”命令进行软件更新了 。

root@c2unix:~# apt-key adv --keyserver hkp://keys.gnupg.net --recv-keys 7D8D0BF6

Kali_Linux_19

16.Kali VirtualBox增强功能失效解决方法

Kali Liunx系统的Virtualbox增强功能突然失效,导致复制、全屏等功能无法使用 。在需要用Kali Linux系统的时候很不方便,尝试重装Virtualbox增强功能(出错了)。具体原因请看错误信息中提示的日志文件: /var/log/vboxadd-install.log

root@c2unix:~# sudo ./VBoxLinuxAdditions.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 4.1.12 Guest Additions for Linux.........
VirtualBox Guest Additions installer
Removing installed version 4.1.12 of VirtualBox Guest Additions...
Removing existing VirtualBox DKMS kernel modules ...done.
Removing existing VirtualBox non-DKMS kernel modules ...done.
Building the VirtualBox Guest Additions kernel modules
The headers for the current running kernel were not found. If the following
module compilation fails then this could be the reason.

Building the main Guest Additions module ...fail!
(Look at /var/log/vboxadd-install.log to find out what went wrong)
Doing non-kernel setup of the Guest Additions ...done.
Installing the Window System drivers
Warning: unknown version of the X Window System installed.  Not installing
X Window System drivers.
Installing modules ...done.
Installing graphics libraries and desktop services components ...done.

解决方法:先更新源、已安装软件包,然后再安装virtualbox-guest-x11软件包 。

root@c2unix:~# apt-get update
root@c2unix:~# apt-get upgrade
root@c2unix:~# sudo apt-get install virtualbox-guest-x11

在安装过程中会出现Y/N选项,默认选项为N,这里我们选择Y使用新版本进行安装。可以使用apt-cache policy命令查询软件包的安装状态和版本信息。以下信息是问题解决后补的,可能会有些差别 。
相关软件包有:virtualbox-guest-dkms、virtualbox-guest-utils、virtualbox-guest-x11 。

virtualbox-guest-x11:
  已安装:(无)
  候选软件包:4.3.10-dfsg-1~bpo70+1
  版本列表:
 *** 4.3.10-dfsg-1~bpo70+1 0
        500 http://mirrors.ustc.edu.cn/kali/ kali/contrib i386 Packages
        100 /var/lib/dpkg/status
     4.1.18-dfsg-2.1 0
        500 http://mirrors.ustc.edu.cn/kali/ kali/main i386 Packages
     4.1.18-dfsg-2+deb7u3 0
        500 http://mirrors.ustc.edu.cn/kali-security/ kali/updates/main i386 Packages

参考文献(References):

[1] http://ha.cker.in/1092.seo[2] http://os.51cto.com/art/201405/439494_1.htm[3] http://www.2cto.com/Article/201304/200418.html[4] http://www.blackmoreops.com/2014/06/19/kali-linux-remote-ssh[5] http://www.drchaos.com/the-ultimate-installation-guide-for-kali-linux[6] http://www.xuanhun521.com/Blog/2013/12/17/kali-linux渗透测试实战-12-环境安装及初始化[7] http://www.blackmoreops.com/2013/10/26/how-to-install-flash-in-kali-linux/[8] http://www.blackmoreops.com/2014/01/16/fix-sound-mute-kali-linux-boot/[9] http://www.blackmoreops.com/2013/10/30/add-official-kali-linux-repositories/[10] http://www.blackmoreops.com/2014/04/11/install-cairo-dock-kali-linux/[11] http://www.blackmoreops.com/2014/01/28/revert-kali-linux-login-classic-backtrack-command-line-login/

【本文由安全脉搏Evil_Jacks原创 转载请注明来自安全脉搏 分享技术 悦享品质 】

本文作者:潇湘信安

本文为安全脉搏专栏作者发布,转载请注明:https://www.secpulse.com/archives/32875.html

Tags:
评论  (5)
快来写下你的想法吧!

潇湘信安

文章数:57 积分: 15

关注微信公众号【潇湘信安】,一起学习网络安全知识!

安全问答社区

安全问答社区

脉搏官方公众号

脉搏公众号