Remote Code Execution Overview

As a managed services provider (MSP), your customers rely on you to keep up to date with potential threats to their data and security. These potential threats require MSPs to consider remote code execution (RCE), a network vulnerability that allows hackers to hijack machines in order to wreak havoc. Once machines are hijacked, hackers can deny service to rightful users, steal or destroy data, and commandeer network resources for their own purposes.

What is remote code execution? 

Remote code execution can take a variety of forms—but on a basic level, RCE refers to the process by which an agent can exploit a network vulnerability to run arbitrary code on a targeted machine or system.

While not every instance of remote code execution is due to nefarious activity, the decision to gain access to a network using this backdoor approach generally signals questionable motives. By this logic, most instances of arbitrary code execution constitute a full-blown RCE attack.

What is an RCE attack? 

In an RCE attack, hackers intentionally exploit a remote code execution vulnerability to run malware. RCE can have disastrous ramifications for an MSP’s network—by prompting the targeted device to perform code execution, a hacker can run their own programming in its place. This programming can then enable them to gain full access, steal data, carry out a full distributed denial of service (DDoS) attack, destroy files and infrastructure, or engage in illegal activity. And as the term remote execution suggests, an RCE cyberattack can take place from any geophysical location.

To understand how such a glaring breach could occur, it’s important to review common vulnerabilities that can leave certain networks at risk of cyberattack: buffer overflows, deserialization, and type confusion.

  • Buffer overflow
    buffer overflow vulnerability refers to memory corruption that can enable malicious RCE. Buffers are sequential memory partitions that can only contain a set amount of data. When programs do not include bounds-checking measures, input can exceed the allocated memory. When a buffer overflows, it overwrites the memory in adjacent buffers. Deploying buffer overflows intentionally can destroy useful data, cause network crashes, or replace memory with arbitrary code that the instruction pointer (manipulated through another vulnerability) later executes. The first buffer overflow attack took place in 1988. The Morris Worm, a now infamous program that was responsible for the attack, caused chaos throughout the U.S. computer system, crashing 6,000 of 60,000 computers on the internet.
  • Deserialization
    A deserialization vulnerability refers to the translation of data into a live object which can accidentally result in the execution of ordinary code. An object must be serialized—converted into binary—to travel over a network. To utilize this data, a program must deserialize it, converting it back into an object. By manipulating serialized data, unauthorized attackers can produce altered objects that cause the program to execute unintended programming upon deserialization.
  • Type confusion
    Type confusion refers to a vulnerability in which code passes off an object without checking its type. This can lead to a mismatch between the object and the type it ought to be. Attackers can take advantage of this vulnerability by writing into the memory block for an object with one type pointer and reading it with another type pointer, allowing them to execute arbitrary code.

Why do hackers launch RCE attacks? 

The question of why hackers launch RCE attacks is fairly open-ended, and hackers could have any number of reasons for executing malicious code. The chief motivators tend to be corporate espionage, personally motivated ill will, or financial gain. In regards to financially motivated attacks, research has found that nearly 90% of RCE attacks take place for the sole purpose of cryptomining.

When a cryptocurrency transaction takes place, a cryptocurrency miner must account for the exchange by adding it to the blockchain. To do this, the miner must solve complex mathematical problems to verify the transaction by cementing its data with a certain block. Many cryptominers compete with one another at this stage, vying for the cryptopayment by trying to beat other miners to a solution to successfully authorize the transaction.

The mathematical problems that miners are tasked with are so complex that they require a great deal of CPU, more than an average person owns. For this reason, many miners launch RCE attacks with privilege escalation to usurp a network, deny service to users, and monopolize the CPU for mining, thereby increasing their income.

How to prevent RCE attacks 

RCE attacks are quite complex, and, as recent developments in the field attest, network vulnerabilities are always evolving and creating new possibilities for exploitation. That being said, there are two key preemptive measures MSPs can take to secure their networks against attack and raise the proper red flags when potential threats arise.

  1. Keep both operating systems and third-party software fully updated
    In other words, make sure to implement patches as they become available in response to detected bugs. In addition, it goes without saying that users should employ safe internet browsing behaviors. As the research underscores, hackers don’t abandon old exploits just because patches have developed to thwart them. They can—and do—attack networks using old tricks with the hope that a system is outdated and can still be manipulated.
  2. Invest in quality threat detection software
    This can help with a plethora of tasks that alert MSPs when their customers’ networks could be vulnerable to an expensive attack. Further, it’s wise to Choose products specifically designed with MSPs in mind, as MSP needs vary in scale, scope, and logistics compared to in-house IT departments.

RCE—an ongoing problem

Despite programmers working to continually improve coding practices to try to plug attacks on vulnerablities, RCE attacks continue to slip through the cracks. Earlier in 2019, Cisco discovered 11 bugs in the Sierra Wireless AirLink ES450 LTE gateway, which could jeopardize any users on the 5G network. Two of these bugs enable RCE and arbitrary command injection, which highlights the pertinence of RCE exploits even in newly developed technology.

Furthermore, even bugs with known patches still plague modern machines, and they will continue to do so as long as outdated systems or unaware users remain a source of potential profit. According to a Fidelis report covering security exploits in the first quarter of 2019, 27% of targeted vulnerabilities were bugs from 2017 and earlier—problems that had existing solutions to draw from but had yet to be implemented.

For these reasons, it’s clear that MSPs need to continue strict implementation of common preventative measures—and perhaps more importantly, stay aware of the many ways that hackers can deploy RCE to crash devices and compromise entire networks.

Interested in learning more about protecting your customers from remote code execution? Explore our product suite to see how you can monitor for these vulnerabilities.