Attackers use remote code execution as a way to gain unauthorized access, perform data breaches, disrupt services, and deploy malware. Let’s dive deep into remote code execution and its prevention techniques.
Remote Code Execution (RCE) is a method that allows threat actors and attackers to gain unauthorized access to devices and launch attacks from a remote location. With RCE, hackers can infiltrate their target's systems without needing physical access to the networks or devices.
RCE vulnerabilities fall under arbitrary code execution (ACE), which encompasses a range of vulnerabilities enabling attackers to execute unauthorized code and take control of targeted systems.
Here’s how RCE attacks work, step by step:
WannaCry. In 2017, WannaCry spread autonomously, encrypting files and demanding ransom. Many systems affected by WannaCry hadn't been properly updated. In early 2021, many companies were affected by WannaCry because the attack quickly spread to other computers on a network.
Log4J. Log4J is used to keep a record of things that happen on a computer system, like errors or routine operations. It helps system administrators know what's going on. In December 2021, Log4J's feature allowing code injection into log messages was exploited by hackers to remotely control computers.
Let’s now look at the 3 types of remote code execution attacks.
Attackers inject malicious code or commands into a target system through:
Exploit vulnerabilities in the deserialization process of an application. Attackers manipulate serialized data to execute malicious code during deserialization.
This occurs when an attacker writes data beyond the boundaries of a memory buffer or data structure. It allows them to modify critical data, control program flow, and execute arbitrary code.
(Learn how to detect RCEs with the Splunk Threat Research Team.)
RCE vulnerabilities can have significant impacts on organizations, ranging from financial losses to reputational damage and compromised data security. Here are some key impacts:
Attackers execute arbitrary code on a remote system and gain unauthorized access to the target organization's network, servers, or applications. Once they get access, they can:
RCE vulnerabilities result in data breaches where sensitive information is accessed, stolen, or tampered with. Depending on the compromised data, organizations can face:
Attackers disrupt critical services or applications by executing malicious code to crash systems, causing downtime and interruptions in business operations. This leads to:
(Downtime costs a lot. Find out how much.)
Attackers can misuse RCE to launch a denial-of-service attack, rendering the system unresponsive and resulting in:
Attackers can deploy malicious code on the compromised system to run cryptomining software without the owner's consent, leading to:
Ransomware encrypts files on a targeted system and demands a ransom for their decryption. Attackers gain control through RCE, initiate the ransomware attack, and ask for a ransom payment.
Last year, Splunk security research team SURGe wanted to know the answer to: “How long do you have before ransomware encrypts your systems?” The answer: faster than you think. Read the blog or the full research.
Now let’s look at some CVEs that relied on remote code execution. The Common Vulnerabilities and Exposures (CVE) is a publicly available listing of frequently occurring vulnerabilities and exposures.
CVE-2021-44228 allows RCE attacks when the library is used with a certain configuration. Exploited by sending a crafted log message to a vulnerable server. Update to the latest patched version (2.15.0 or later).
(See Splunk’s response to Log4j.)
Discovered in the Windows Win32k component. It is an elevation of privilege vulnerability that could be exploited to execute arbitrary code in kernel mode. Ensure Windows systems are updated with the latest patches.
Affects Windows Hyper-V, a virtualization feature in Microsoft Windows. Allows an authenticated attacker to execute arbitrary code on the host operating system. Ensure Windows systems are updated with the latest patches.
Found in WordPress, a popular content management system. It affects the Easy WP SMTP plugin, allowing unauthenticated attackers to execute arbitrary code by injecting malicious PHP code.
(Learn more about these vulnerabilities.)
To mitigate RCE attacks, implement the following techniques:
(Related reading: the many types of IT monitoring.)
Here’s how you can prevent your organization from RCE attacks:
Remote code execution (RCE) attacks are a significant threat to organizations. They involve identifying vulnerabilities, exploiting them with crafted payloads, and executing the attacker's code. To protect against RCE attacks, prioritize the prevention techniques discussed in this article.
See an error or have a suggestion? Please let us know by emailing ssg-blogs@splunk.com.
This posting does not necessarily represent Splunk's position, strategies or opinion.
The Splunk platform removes the barriers between data and action, empowering observability, IT and security teams to ensure their organizations are secure, resilient and innovative.
Founded in 2003, Splunk is a global company — with over 7,500 employees, Splunkers have received over 1,020 patents to date and availability in 21 regions around the world — and offers an open, extensible data platform that supports shared data across any environment so that all teams in an organization can get end-to-end visibility, with context, for every interaction and business process. Build a strong data foundation with Splunk.