唉,本人记性不太好,就把 Kali 相关的东西放这吧方便查看不定期更新...
1.更改 APT 更新源
vi /etc/apt/sources.list
*1.1官方源
deb http://http.kali.org/kali kali-rolling main non-free contrib
#其实这一条就够了
deb-src http://http.kali.org/kali kali-rolling main non-free contrib
deb http://security.kali.org/kali-security kali-rolling/updates main contrib non-free
*1.2阿里云kali源
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.aliyun.com/kali-security kali-rolling/updates main contrib non-free
deb-src http://mirrors.aliyun.com/kali-security kali-rolling/updates main contrib non-free
*1.3中科大kali源
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-security kali-current/updates main contrib non-free
deb-src http://mirrors.ustc.edu.cn/kali-security kali-current/updates main contrib non-free
2.Kali Rolling 中文乱码问题
1.在命令行输入dpkg-reconfigure locales
,(空格是选择,Tab是切换,*是选中),选中en_US.UTF-8
和zh_CN.UTF-8
,确定后,将en_US.UTF-8
选为默认
2.安装中文字体,apt-get install xfonts-intl-chinese
和apt-get install ttf-wqy-microhei
3.打开系统设置,找到区域与语言,将上面改为汉语(中国),重启
3.kali 升级
*3.1整体更新:
apt-get update #更新软件包数据库
apt-get upgrade #升级软件
apt-get dist-upgrade #解决依赖问题
apt-get autoclean #删除已删除软件安装包
apt-get clean #删除已安装软件安装包
*3.2 更新Metasploit
msfupdate
4.安装问题
*4.1 卡格式化
kali有个很奇怪的问题~在格式化分区的时候,似乎不认识ext4之类的文件系统(特么的自家人都不认识)...以这种文件系统在写入系统,格式化分区的时候,会无限停在那个位置。
用工具将分区格式化成 NTFS 后正常安装。
*4.2 安装 .deb 文件
dpkg -i xxxxx.deb
卸载软件
dpkg remove xxxxx.deb
#删除安装文件,不删除配置文件
dpkg -P xxxxx.deb
#删除安装及配置文件
*4.3 conky 的安装配置
apt-get install conky
在 ~
目录下生成一个配置文件
conky -C > ~/.conkyrc
我的配置文件 .conkyrc
-- vim: ts=4 sw=4 noet ai cindent syntax=lua
--[[
Conky, a system monitor, based on torsmo
Any original torsmo code is licensed under the BSD license
All code written since the fork of torsmo is licensed under the GPL
Please see COPYING for details
Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
Copyright (c) 2005-2012 Brenden Matthews, Philip Kovacs, et. al. (see AUTHORS)
All rights reserved.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
]]
conky.config = {
alignment = 'bottom_right',
background = true,
border_width = 1,
cpu_avg_samples = 2,
default_color = 'lightgreen',
default_outline_color = 'lightgreen',
default_shade_color = 'lightgreen',
draw_borders = false,
draw_graph_borders = true,
draw_outline = false,
draw_shades = false,
use_xft = true,
font = 'DejaVu Sans Mono:size=12',
gap_x = 5,
gap_y = 60,
minimum_height = 5,
minimum_width = 5,
net_avg_samples = 2,
no_buffers = true,
out_to_console = false,
out_to_stderr = false,
extra_newline = false,
own_window = true,
own_window_class = 'Conky',
own_window_type = 'desktop',
own_window_argb_visual = true,
own_window_argb_value = 1,
stippled_borders = 0,
update_interval = 1.0,
uppercase = false,
use_spacer = 'none',
show_graph_scale = false,
show_graph_range = false
}
conky.text = [[
#${scroll 16 $nodename - $sysname $kernel on $machine | }
#$hr
${color}Uptime:$color $uptime
${color}Frequency (in MHz):$color $freq
${color}Frequency (in GHz):$color $freq_g
${color}RAM Usage:$color $mem/$memmax - $memperc% ${membar 4}
#${color}Swap Usage:$color $swap/$swapmax - $swapperc% ${swapbar 4}
${color}CPU Usage:$color $cpu% ${cpubar 4}
${color}Processes:$color $processes ${color}Running:$color $running_processes
$hr
${color}File systems:
/ $color${fs_used /}/${fs_size /} ${fs_bar 6 /}
${color}Networking:
Up:$color ${upspeed eth0} ${color} - Down:$color ${downspeed eth0}
$hr
${color}Name PID CPU% MEM%
${color} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${color} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${color} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${color} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
]]
conky在桌面上显示的时候闪烁的问题
安装sudo apt-get install wmctrl
然后修改配置文件里的double_buffer yes
,没有就自己增加。
参考
http://blog.163.com/lixiangqiu_9202/blog/static/535750372012812111141779/
*4.4 VMware 的安装
推荐到官网下载 VMware http://www.vmware.com/products/workstation/workstation-evaluation.html
我在下载中发现,直接下载的话速度太慢,就通过一台国外服务器做了中转,再取回(服务器下载就是快啊,好几兆一秒,取回来的时候几百K,但也比直接下载几K好啊。)
下载完后 是个后缀为.bundle
的文件,安装方法如下:
-
chmod +x XXXXX.bundle
赋予执行权限 -
./XXXXX.bundle
编译安装
如果在安装时遇到提示 找不到 linux-header,输入apt-get install linux-headers-$(uname -r)
,来安装。(你可能需要卸载现在已经安装的)
遇到执行上一步出现无法找到包的情况,可以尝试把源换成官方,执行升级命令,之后再试一次。
注意!如果出现无法找到 gcc 手动卸载已安装的,再安装提示版本。(若是出现‘A compatible version of gcc was not found’无法找到兼容的gcc版本,选择两次gcc文件,再点击 install 就好了,这个文件存在于/usr/bin目录下。)
附上激活码:
- 5A02H-AU243-TZJ49-GTC7K-3C61N
- VY1DU-2VXDH-08DVQ-PXZQZ-P2KV8
- VF58R-28D9P-0882Z-5GX7G-NPUTF
- YG7XR-4GYEJ-4894Y-VFMNZ-YA296
- UC5MR-8NE16-H81WY-R7QGV-QG2D8
- ZG1WH-ATY96-H80QP-X7PEX-Y30V4
- GA1T2-4JF1P-4819Y-GDWEZ-XYAY8
- FY1M8-6LG0H-080KP-YDPXT-NVRV2
- ZA3R8-0QD0M-489GP-Y5PNX-PL2A6
- FZ5XR-A3X16-H819Q-RFNNX-XG2EA
- ZU5NU-2XWD2-0806Z-WMP5G-NUHV6
- VC58A-42Z8H-488ZP-8FXZX-YGRW8
*4.5 中文输入法的安装
apt-get install fcitx-table-wbpy ttf-wqy-microhei ttf-wqy-zenhei #拼音五笔
apt-get install ibus ibus-pinyin #经典的ibus
apt-get install fcitx fcitx-googlepinyin #fcitx拼音
ibus具体安装
apt-get install ibus ibus-clutter ibus-gtk ibus-gtk3 ibus-qt4
im-switch -s ibus
apt-get install ibus-pinyin
ibus-setup //执行该命令后会弹出ibus设置窗口,可以设置后重启电脑就可以使用ibus-pinyin输入法
*4.6 open-vm-tools的安装
apt-get update
apt-get install open-vm-tools-desktop fuse
*4.7 VPN安装
apt-get install network-manager-pptp network-manager-pptp-gnome network-manager-openvpn network-manager-openvpn-gnome
*4.8 安装 uGet 和 aria2
apt-get install uget aria2
安装后可利用 uGet 下载百度云的文件
5.查看系统版本
*5.1 查看系统发行版本
cat /etc/issue
*5.2 查看内核版本
cat /proc/version
*5.3 查看系统位数
getconf LONG_BIT
显示多少就是多少位啦
6.工具利用
*6.1 wget
wget 是个很好用的工具,常用来下载。比如:
wget http://cdn2.ime.sogou.com/dl/index/1475146281/sogoupinyin_2.1.0.0082_i386.deb?st=Vl6CzfMX0bSYbf5xCnk17Q&e=1477909376&fn=sogoupinyin_2.1.0.0082_i386.deb
这是下载搜狗输入法,其格式为 wget [url]
有的下载需要参数:wget -no-check-certificate [url]
这是带了一个不检查证书的参数
这是别人写的比较详细的介绍
http://www.cnblogs.com/peida/archive/2013/03/18/2965369.html
在做渗透测试的时候,收集信息往往是比较重要的一环,有时需要查看网站源码,那么就可以用 wget 来整站下载,以便收集更多信息。
wget -U "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GTB5)" -r -p -k -nc -o down.log [url]
- -U 修改agent,伪装成指定浏览器
- -r 递归。对于HTTP主机,wget首先下载URL指定的文件,然后(如果该文件是一个HTML文档的话)递归下载该文件所引用(超级连接)的所有文件(递 归深度由参数-l指定)。对FTP主机,该参数意味着要下载URL指定的目录中的所有文件,递归方法与HTTP主机类似
- -c 指定断点续传功能。实际上,wget默认具有断点续传功能,只有当下载了某一文件的一部分,并希望wget接着完成此工作的时候,才需要指定此参数
- -nc 不下载已经存在的文件-np 表示不跟随链接,只下载指定目录及子目录里的东西
- -p 下载页面显示所需的所有文件。比如页面中包含了图片,但是图片并不在/yourdir目录中,而在/images目录下,有此参数,图片依然会被正常下载
- -k 修复下载文件中的绝对连接为相对连接
详细介绍 http://www.cnblogs.com/lidp/archive/2010/03/02/1696447.html
百度云文件下载
wget -c "url"
url可以先通过浏览器获取,再复制过来
7.其它设置
*7.1 添加sudo权限
编辑 /etc/sudoers
找到 root ALL(ALL:ALL) ALL
添加 xxx ALL(ALL) ALL
xxx为用户名