ABB Cylon Aspect 3.08.03 - Hard-coded Secrets

Exploit Author: LiquidWorm Analysis Author: www.bubbleslearn.ir Category: WebApps Language: Java Published Date: 2025-04-15
ABB Cylon Aspect 3.08.03 Hard-coded Secrets


Vendor: ABB Ltd.
Product web page: https://www.global.abb
Affected version: NEXUS Series, MATRIX-2 Series, ASPECT-Enterprise, ASPECT-Studio
                  Firmware: <=3.08.03

Summary: ASPECT is an award-winning scalable building energy management
and control solution designed to allow users seamless access to their
building data through standard building protocols including smart devices.

Desc: The ABB Cylon Aspect BMS/BAS controller contains multiple instances
of hard-coded credentials, including usernames, passwords, and encryption
keys embedded in various java classes. This practice poses significant security
risks, allowing attackers to gain unauthorized access and compromise the
system's integrity.

Tested on: GNU/Linux 3.15.10 (armv7l)
           GNU/Linux 3.10.0 (x86_64)
           GNU/Linux 2.6.32 (x86_64)
           Intel(R) Atom(TM) Processor E3930 @ 1.30GHz
           Intel(R) Xeon(R) Silver 4208 CPU @ 2.10GHz
           PHP/7.3.11
           PHP/5.6.30
           PHP/5.4.16
           PHP/4.4.8
           PHP/5.3.3
           AspectFT Automation Application Server
           lighttpd/1.4.32
           lighttpd/1.4.18
           Apache/2.2.15 (CentOS)
           OpenJDK Runtime Environment (rhel-2.6.22.1.-x86_64)
           OpenJDK 64-Bit Server VM (build 24.261-b02, mixed mode)
           ErgoTech MIX Deployment Server 2.0.0


Vulnerability discovered by Gjoko 'LiquidWorm' Krstic
                            @zeroscience


Advisory ID: ZSL-2025-5896
Advisory URL: https://www.zeroscience.mk/en/vulnerabilities/ZSL-2025-5896.php


21.04.2024

--


$ cat project

                 P   R   O   J   E   C   T

                        .|
                        | |
                        |'|            ._____
                ___    |  |            |.   |' .---"|
        _    .-'   '-. |  |     .--'|  ||   | _|    |
     .-'|  _.|  |    ||   '-__  |   |  |    ||      |
     |' | |.    |    ||       | |   |  |    ||      |
 ____|  '-'     '    ""       '-'   '-.'    '`      |____
░▒▓███████▓▒░░▒▓███████▓▒░ ░▒▓██████▓▒░░▒▓█▓▒░▒▓███████▓▒░  
░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ 
░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ 
░▒▓███████▓▒░░▒▓███████▓▒░░▒▓████████▓▒░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ 
░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ 
░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ 
░▒▓███████▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ 
         ░▒▓████████▓▒░▒▓██████▓▒░ ░▒▓██████▓▒░ 
         ░▒▓█▓▒░░░░░░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░
         ░▒▓█▓▒░░░░░░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░░░░░░ 
         ░▒▓██████▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒▒▓███▓▒░
         ░▒▓█▓▒░░░░░░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░
         ░▒▓█▓▒░░░░░░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░
         ░▒▓█▓▒░░░░░░░░▒▓██████▓▒░ ░▒▓██████▓▒░ 


$ cat secrets.txt

- SynchronizedSecurityServicesHandler.class -> CrET8MEbraME4ahu
- MapInvisibleSchedule.class                -> calendar:user
- WDSupervisor.class                        -> aamservletuser:kakideco
- AESCipher2.class                          -> uajo4nzibb$#1E4V5262b17f-c3d5-4190-a442-6d251f9da52b
- AESCipher.class                           -> default
- BrokerURL.class                           -> aamuser:default
- Schedule.class                            -> calendar:user
- BfUtils.class                             -> CrET8MEbraME4ahu
- Context.class                             -> \037jchabucos:friske
- Db.class                                  -> matrixac1:aam


ABB Cylon Aspect 3.08.03 — Hard‑coded Secrets (Overview and Mitigation)

Hard‑coded secrets in Building Management Systems (BMS) are a high‑risk vulnerability class. In ABB Cylon Aspect firmware and related components (<= 3.08.03), multiple instances of embedded usernames, passwords and encryption keys were reported inside Java classes and binaries. This article explains the technical risk, real‑world impact, detection and remediation strategies, and secure coding countermeasures for vendors and operators.

Affected products and versions

Product / SeriesAffected firmware / versions
NEXUS Series≤ 3.08.03
MATRIX‑2 Series≤ 3.08.03
ASPECT‑Enterprise / ASPECT‑Studio≤ 3.08.03

What is the vulnerability?

Hard‑coded secrets are credentials (usernames, passwords, API keys, encryption keys) embedded directly in source code or compiled artifacts. In this case, multiple Java classes and packaged artifacts contained literal secrets. Because binaries and jars retain string constants, these secrets can be extracted or reused by anyone with access to the files or firmware image.

Why hard‑coded secrets are dangerous

  • They are discoverable by simple static analysis of binaries or jar/class files.
  • They cannot be rotated easily — changing a secret usually requires code or firmware changes.
  • If a secret grants privileged access, compromise of one device can enable lateral movement across a site.
  • Embedded encryption keys undermine cryptographic protections if keys are accessible to attackers.

Potential real‑world impact for BMS

  • Unauthorized access to control planes (HVAC, lighting, metering) leading to safety or comfort incidents.
  • Information disclosure of facility data (configuration, schedules, occupancy data).
  • Persistence and pivoting into corporate networks if management systems are not properly segmented.
  • Regulatory, compliance and operational disruptions after a breach (service interruptions, remediation costs).

Example of a vulnerable pattern (sanitized)

public class DBConfig {
    // Vulnerable: secret embedded in source/binary
    private static final String DB_USER = "aamuser";
    private static final String DB_PASS = "REDACTED_PASSWORD";
}

Explanation: This example shows a typical pattern where credentials are declared as static final fields. When compiled, the literal strings remain in the class file and can be recovered with tools that inspect compiled artifacts.

Secure alternatives (fixes with examples)

Avoid embedding secrets. Instead use secure configuration delivery at runtime, a secrets manager, or OS‑level protected configuration with strict permissions.

// Example: read credentials from environment variables (Java)
public class DBConfig {
    private final String user;
    private final String pass;

    public DBConfig() {
        this.user = System.getenv("ASPECT_DB_USER");
        this.pass = System.getenv("ASPECT_DB_PASS");
        if (user == null || pass == null) {
            throw new IllegalStateException("Missing DB credentials");
        }
    }
    // getters...
}

Explanation: This snippet demonstrates retrieving credentials from environment variables at process startup. Environment variables let operators inject secrets per deployment without altering code or committing secrets to artifacts. Environment variables should themselves be provided securely by orchestration (systemd, containers, or a secrets manager).

// Example: load secret from Java KeyStore (JKS/JCEKS)
KeyStore ks = KeyStore.getInstance("JCEKS");
try (FileInputStream fis = new FileInputStream("/etc/keys/aspect.jceks")) {
    ks.load(fis, keystorePassword.toCharArray()); // keystore password must be protected
}
SecretKey secret = (SecretKey) ks.getKey("dbPassAlias", keyPassword.toCharArray());
String dbPass = new String(secret.getEncoded(), StandardCharsets.UTF_8);

Explanation: Using a Java KeyStore or JCEKS allows encryption of stored secrets and controlled access. The keystore file should be protected by OS filesystem permissions and, where possible, the keystore password should be managed via a higher‑level secret manager rather than hard‑coded.

Recommended remediation steps for administrators

  • Immediately upgrade to a vendor‑published fixed firmware or apply vendor mitigations if available.
  • Rotate all credentials and cryptographic keys that might have been embedded or derived from embedded secrets.
  • Audit connected systems for indicators of compromise — check logs, connections, and unexpected configuration changes.
  • Isolate impacted devices from sensitive networks until they are patched and credentials rotated.
  • Apply network segmentation and restrict management interfaces (least privilege, VPN/ACLs).
  • Enforce monitoring and alerting for unusual administrative access or configuration changes.

How to detect hard‑coded secrets

Detection is typically done via static scanning of source or compiled artifacts and via runtime checks:

  • Use secret scanning tools (e.g., GitLeaks, truffleHog, SonarQube rules) on source repositories.
  • Scan packaged Java artifacts with tools that extract strings from .jar and .class files and search for credential patterns.
  • Audit firmware images and configuration files before deployment.
  • Perform regular credential inventory and verify that no secret is discoverable in binaries.

Secure development lifecycle recommendations

  • Never check secrets into source control. Add commit hooks and CI checks to block accidental commits.
  • Integrate secret scanning in CI/CD pipelines to detect leaks before packaging.
  • Use a centralized secrets manager (HashiCorp Vault, AWS Secrets Manager, Azure Key Vault) with short‑lived credentials where possible.
  • Implement role‑based access control (RBAC) and the principle of least privilege for service accounts.
  • Document and enforce key rotation policies and automated rotation where supported.

Vendor responsibilities

  • Provide timely patches and clear guidance to customers identifying affected firmware builds and fixed versions.
  • Offer a method for customers to replace secrets without requiring full firmware rebuilds (e.g., configuration files, secure API for secret injection).
  • Perform secure code reviews and automated secret scanning prior to release.
  • Provide an incident response channel and disclosure timeline so operators can act promptly.

Incident response checklist (if you suspect compromise)

  • Isolate affected systems and preserve forensic evidence (logs, memory images, firmware copies).
  • Revoke and rotate exposed credentials and keys immediately.
  • Apply vendor patches and validate integrity of firmware and software.
  • Conduct a root‑cause investigation to determine when and how credentials were accessed.
  • Notify relevant stakeholders, regulators or partners according to legal/contractual obligations.

Conclusion

Hard‑coded secrets greatly increase the attack surface of building management systems like ABB Cylon Aspect. Operators should treat this class of vulnerability as urgent: apply vendor updates, rotate credentials, and implement secret management and runtime protections. Vendors must eliminate embedded secrets from builds and instead rely on secure, auditable secrets management and deployment mechanisms.