用户配置
- kali用户
sudo apt update
#更新apt源
- root用户
sudo su
sudo passwd root
#更改root密码
网络配置
#配置IP:
/etc/network/interfaces
auto eth0
iface eth0 inet static
address 192.168.1.228
netmask 255.255.255.0
gateway 192.168.1.1
#配置DNS:
/etc/resolv.conf
#重启服务
service networking restart
service network-manager restart
自动获取
IP:dhclient
设置APT源
cp /etc/apt/sources.list /etc/apt/sources.list.bak
vim /etc/apt/sources.list
apt-get update
apt-get clean
apt源如下:
#中科大
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
APT使用
- apt-get
apt get 可以从认证软件源下载软件包及相关信息,以便安装和升级软件包,或者用于移除软件包。
在这些过程中,软件包依赖会被妥善处理。
- 常用命令
update - 取回更新的软件包列表信息
upgrade - 进行一次升级
install - 安装新的软件包(注:软件包名称是 libc6 而非libc6.deb)
reinstall - Reinstall packages (pkg is libc6 not libc6.deb)
remove - 卸载软件包
- apt 与 apt-get的区别与解释
Linux中apt与apt-get命令的区别与解释
简单来说就是:apt = apt-get、apt-cache 和 apt-config 中最常用命令选项的集合。
虽然 apt 与 apt get 有一些类似的命令选项,但它并不能完全向下兼容 apt get 命令。也就是说,
可以用 apt 替换部分 apt get 系列命令,但不是全部。
apt 可以看作 apt get 和 apt cache 命令的子集, 可以为包管理提供必要的命令选项。
apt get 虽然没被弃用,但作为普通用户,还是应该首先使用 apt 。
设置中文
- 安装中文字体
apt-get install xfonts-intl-chinese
apt-get install ttf-wqy-microhei
- 设置语言
dpkg-reconfigure locales
进入图形界面,选中 en_US.UTF 8 UTF 8 和 zh_CN.UTF 8 UTF 8 并将 zh_CN.UTF 8 选为默认。
(空格是选择,tab是切换, * 是选中)
- 重启
reboot
配置Python
- pip简介
pip 是一个 Python 包安装与管理工具。
Kali2022 默认安装 python2.7 和 python3. 9 ,但需自行配置 pip - apt安装
apt install python3-pip
apt install python-pip
- 脚本安装
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip2.py
python2 get-pip2.py
curl https://bootstrap.pypa.io/get-pip.py -o get-pip3.py
python3 get-pip3.py & pip3 list
- pip安装 Python 库
sudo pip3 install pwntools
#pip使用国内代理:
pip3 install -r requirements.txt -i https://mirrors.ustc.edu.cn/pypi/web/simple
Git使用
- Git教程
https://www.runoob.com/git/git-tutorial.html
SSH登录
- SSH简介
SSH 为 Secure Shell 的缩写,SSH 为建立在应用层基础上的安全协议。
SSH 是较可靠,专为远程登录会话和其他网络服务提供安全性的协议。 - SSH配置
开启密码登录、允许root用户登录:
vim /etc/ssh/sshd_config
#PermitRootLogin prohibit-password
PermitRootLogin yes
- 开启或重启ssh:
service ssh start
service ssh restart
- 查看22端口是否开启监听:
netstat -anltup | grep 22
- 添加开机启动:
systemctl enable ssh
update-rc.d ssh enable
- 终端连接:
ifconfig
ssh root@192.168.123.136
Kali 工具
https://tools.kali.org/tools-listing
https://github.com/Jack-Liang/kalitools
- 信息收集
- 漏洞分析
- WEB应用分析
- 数据库评估
- 密码攻击
- 无线攻击
- 逆向工程
- 利用工具
- 嗅探&欺骗
- 后渗透攻击
- 取证工具
- 报告工具
- 社会工程学工具