赞
踩
⚠️声明: 本案例仅供个⼈实验使⽤, 并不作任何违法违纪等不正当⾏为使⽤!!!
⚠️请观看使⽤本⽂者遵守约定!!!
10.8.162.216
10.8.162.215
10.8.162.219
安装过程略
打开控制面板
输入控制命令
ettercap -G
EtterCap是一个基于ARP地址欺骗方式的网络嗅探工具,主要适用于交换局域网络。借助于EtterCap嗅探软件,渗透测试人员可以检测网络内明文数据通讯的安全性,及时采取措施,避免敏感的用户名/密码等数据以明文的方式进行传输。ettercap几乎是每个渗透测试人员必备的工具之一。(本文已Kali Linux为例)
先选择Sniff在选择Unified sniffing添加桥接网卡
点击“OK”连接桥接⽹卡, 准备伪装⽹关
先点击
点击“Scan for hosts” 扫描所有局域⽹内的主机
此时ip访问owaspbwa靶机
注:暂时不要输入用户名与密码
输入密码后
kali可以监控到
实验一完成
yum -y install php php-fpm php-curl \
php-intl php-mysql nginx mariadb-server mariadb
[root@localhost ~]# systemctl start nginx
[root@localhost ~]# systemctl start php-fpm.service
[root@localhost ~]# systemctl start mariadb.service
MariaDB [(none)]> create database farm;
Query OK, 1 row affected (0.00 sec)
修改php配置文件
[root@xiaobai-qqfarm] vim /etc/php.ini
#short_open_tag,将short_open_tag = Off改为On
[root@localhost ~]# unzip farm-ucenter1.5_.zip
[root@localhost ~]# rm -rf /usr/share/nginx/html/*
[root@localhost ~]# cp -r upload/* /usr/share/nginx/html/
[root@localhost ~]# chmod 777 /usr/share/nginx/html/ -R
[root@localhost ~]# mysql farm < /usr/share/nginx/html/qqfarm.sql
[root@localhost ~]# systemctl restart nginx
[root@localhost ~]# systemctl restart php-fpm.service
访问ip
实验二完成
CA 证书颁发机构(CA, Certificate Authority)
基于https的协议工作的一中虚拟主机,要构建这样的网站需要mod_ssl模块的支持。且需要提供两个文件:证书文件和私钥文件,证书文件是标识这个网站服务器身份的,私钥文件主要用来实现在服务器端对数据进行加密,然后在网站中传输的。证书在生产生活中需要到对应的机构去申请,在实验环境中本应该搭建一台证书服务器.
[root@localhost ~]# mkdir -p /etc/nginx/ssl
[root@localhost ~]# openssl genrsa 1024 > /etc/nginx/ssl/server.key
Generating RSA private key, 1024 bit long modulus
..++++++
...............++++++
e is 65537 (0x10001)
[root@localhost ~]# openssl req -new -key /etc/nginx/ssl/server.key > /etc/nginx/ssl/server.csr You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [XX]:CN State or Province Name (full name) []:BJ Locality Name (eg, city) [Default City]:BJ Organization Name (eg, company) [Default Company Ltd]:qf Organizational Unit Name (eg, section) []:cloud Common Name (eg, your name or your server's hostname) []:nginx.com Email Address []:123456@qq.com Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []: An optional company name []: [root@localhost ~]# ls /etc/nginx/ssl/ server.csr server.key
详细解释查看
https://blog.csdn.net/Lancelotest/article/details/108941174
[root@nginx ~]# ls /etc/nginx/ssl/
server.csr #(证书申请)
server.key #(私钥)
[root@nginx ~]# openssl req -x509 -days 365 -key /etc/nginx/ssl/server.key -in /etc/nginx/ssl/server.csr > /etc/nginx/ssl/server.crt
注释
-x509:证书的格式,固定的
days:证书的有效期,生产生活中时间不同,价格不同
key:指定秘钥文件
in:指定证书申请文件
查看证书
[root@nginx ~]# ll /etc/nginx/ssl/
总用量 12
-rw-r–r--. 1 root root 1021 7月 12 17:31 server.crt ####证书文件
-rw-r–r--. 1 root root 676 7月 12 17:30 server.csr ####申请书。可以销毁
-rw-r–r--. 1 root root 887 7月 12 17:12 server.key ####私钥文件
修改nginx的配置文件
vim /etc/nginc/conf.d/default.conf
前提
电脑本机配置域名解析
打开
C:\Windows\System32\drivers\etc
10.8.162.219 www.casd123.com
server { listen 80; server_name www.casd123.com; rewrite ^(.*)$ https://${server_name}$1 permanent; } server { listen 443 ssl; server_name www.casd123.com; location / { root /farm; index index.php; } ssl_certificate /etc/nginx/ssl/server.crt; ssl_certificate_key /etc/nginx/ssl/server.key; error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } location ~ \.php$ { root /farm; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } }
访问测试
成功登录而ettercap为检测到账户名密码
实验三完成
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。