Kali linux是基于Debian的Linux的发行版,高级渗透测试及安全审核的工具。
kali linux:
1、包含600+渗透测试工具
2、完全免费
3、多语言
Kali linux镜像下载地址:
http://old.kali.org/kali-images/
重命名虚拟机名称为Kali,➡下一步
➡➡➡下一步,创建新磁盘
➡下一步,选择Kali镜像文件
➡➡漫长的安装
┌──(root㉿kali)-[/home/seal/Desktop]
└─# vi /etc/apt/sources.list
*********************源地址*****************************
#aliyun 阿里云
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
#ustc 中科大
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
#kali 官方源
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
#deb-src http://security.kali.org/kali-security kali-rolling/updates main contrib non-free
更新软件列表
┌──(root㉿kali)-[/home/seal/Desktop]
└─# apt-get update
┌──(root㉿kali)-[/home/seal/Desktop]
└─# systemctl start mariadb
┌──(root㉿kali)-[/home/seal/Desktop]
└─# systemctl status mariadb
###开机自启####
┌──(root㉿kali)-[/home/seal/Desktop]
└─# systemctl enable mariadb
┌──(root㉿kali)-[/home/seal/Desktop]
└─# apt install apache2 -y
┌──(root㉿kali)-[/home/seal/Desktop]
└─# service apache2 status
###开机自启####
┌──(root㉿kali)-[/home/seal/Desktop]
└─# systemctl enable apache2
┌──(root㉿kali)-[/home/seal/Desktop]
└─# service apache2 restart
DVWA(Damn Vulnerable Web App)是用PHP+MySQL编写的一个用于常规Web漏洞教学的测试网站,包含了SQL注入、命令执行、文件上传等常见的一些安全漏洞。
DVWA下载地址:
链接:https://pan.baidu.com/s/1QT2HXBCMKUxkDpO0sLnf2w
提取码:dvwa
┌──(root㉿kali)-[/home/seal/Desktop]
└─# unzip DVWA-master.zip
移动DVWA-master 至 /var/www/html/dvwa
┌──(root㉿kali)-[/home/seal/Desktop]
└─# mv DVWA-master /var/www/html/dvwa
┌──(root㉿kali)-[/home/seal/Desktop]
└─# cd /var/www/html/dvwa
┌──(root㉿kali)-[/var/www/html/dvwa]
└─# cd config
┌──(root㉿kali)-[/var/www/html/dvwa/config]
└─# ll
total 4
-rw-r--r-- 1 root root 1857 Sep 1 2020 config.inc.php.dist
┌──(root㉿kali)-[/var/www/html/dvwa/config]
└─# mv config.inc.php.dist config.inc.php
┌──(root㉿kali)-[/var/www/html/dvwa/config]
└─#
访问靶场:http://localhost/dvwa/setup.php
PHP function display_errors: Disabled
PHP function display_startup_errors: Disabled
┌──(root㉿kali)-[/etc/php]
└─# vi /etc/php/8.2/apache2/php.ini
PHP module gd: Missing - Only an issue if you want to play with captchas
┌──(root㉿kali)-[/etc/php]
└─# apt install php-gd
修改配置和安装 php-gd之后,重启apache2
t㉿kali)-[/etc/php]
└─# service apache2 restart
reCAPTCHA key: Missing
public:
6LdJJlUUAAAAAH1Q6cTpZRQ2Ah8VpyzhnffD0mBb
private:
6LdJJlUUAAAAAM2a3HrgzLczqdYp4g05EqDs-W4K
更改mysql配置信息,创建dvwa用户和密码,授权
MariaDB [(none)]> create user'dvwa'@'localhost'identified by 'dvwa';
Query OK, 0 rows affected (0.014 sec)
MariaDB [(none)]> grant all privileges on *.* to 'dvwa'@'%' identified by 'dvwa';
Query OK, 0 rows affected (0.001 sec)
MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.001 sec)
MariaDB [(none)]>
编辑config.inc.php 配置
┌──(root㉿kali)-[/var/www/html/dvwa/config]
└─# vi /var/www/html/dvwa/config/config.inc.php
uploads 文件夹 & config 文件夹赋权——chmod 777
[User: root] Writable folder /var/www/html/dvwa/hackable/uploads/: No
┌──(root㉿kali)-[/var/www/html/dvwa]
└─# cd hackable
┌──(root㉿kali)-[/var/www/html/dvwa/hackable]
└─# ll
total 12
drwxr-xr-x 2 root root 4096 Sep 1 2020 flags
drwxr-xr-x 2 root root 4096 Sep 1 2020 uploads
drwxr-xr-x 2 root root 4096 Sep 1 2020 users
┌──(root㉿kali)-[/var/www/html/dvwa/hackable]
└─# chmod 777 uploads
┌──(root㉿kali)-[/var/www/html/dvwa/hackable]
└─#
[User: root] Writable folder /var/www/html/dvwa/config: No
┌──(root㉿kali)-[/var/www/html/dvwa]
└─# chmod 777 config
┌──(root㉿kali)-[/var/www/html/dvwa]
└─#
┌──(root㉿kali)-[/var/www/html/dvwa/config]
└─# service apache2 restart
┌──(root㉿kali)-[/var/www/html/dvwa/config]
└─# systemctl restart mariadb
┌──(root㉿kali)-[/var/www/html/dvwa/config]
└─#
DVWA默认登陆的用户名:admin ,默认密码:password