Remote Code Execution: When Input Becomes Instructions
A web server is supposed to answer requests using the software its operator installed. A remote code execution flaw can let an outside sender make it run a different set of instructions, chosen by the attacker.
Remote code execution, or RCE, means causing code to run on another system remotely. In a security advisory, an RCE vulnerability is a weakness that can allow an attacker to produce that result.
Code is a set of instructions for a computer. “Arbitrary code execution” means the attacker can choose instructions within the limits of the exploit and the affected program's authority. It doesn't automatically mean unrestricted control of the entire machine.
When a Program Writes Past the End of Its Memory
How outside input changes the code
A program may construct instructions using information supplied from outside. If it doesn't properly control how that information is handled, an attacker can alter the instructions it constructs.
This is code injection, one route to unwanted execution. MITRE's code-injection description explains how externally influenced input can change the behavior of generated code.
RCE names the outcome, not a single underlying defect. Other kinds of software weakness can also produce remote execution. Treating every RCE as the same bug would obscure which component needs fixing and what conditions make it vulnerable.
Once malicious instructions run, they may be able to read or change information or disrupt the service. The extent depends on where they execute and what that running program is allowed to do.
The attacker still needs a way in
The attacker needs a route to the affected component. Some vulnerabilities can be reached through a network request. Others involve a person opening a specially prepared file or visiting a page. A login or particular configuration may also be part of an advisory's prerequisites.
Microsoft's historical MS15-020 bulletin provides examples requiring user action. It also explains that successful execution occurred with the logged-on user's rights.
A process is a running program. If the vulnerable process has limited permissions, the attack initially inherits those limits. An administrator-level process can expose much more authority. Gaining additional permissions is a separate step called privilege escalation; it isn't guaranteed by the letters RCE.
- Skip the install: pfSense Plus comes preloaded, so you can start writing rules right away.
- Get a firewall, router and VPN in one silent box that sips power.
- Keep receiving pfSense Plus updates for the life of the product.
A 2021 Apache flaw depended on its settings
Apache HTTP Server can use an alias to connect a web address to another location on the server. It can also use Common Gateway Interface, or CGI, to run programs that handle requests.
In 2021, a flaw tracked as CVE-2021-42013 affected Apache versions 2.4.49 and 2.4.50. It let specially prepared requests reach files outside the directories set by aliases when the usual rules denying that access weren't in place. If CGI was enabled for those affected paths, the flaw could allow code execution.
The Apache advisory identified those versions, conditions and a fix. The same product with a different version or configuration could have a different exposure.
That is how an advisory becomes actionable: match the installed version and configuration to the affected conditions, then use the vendor's applicable fix. Least privilege can reduce what a compromised process is allowed to damage, but it doesn't repair the defect that let the code run.
Input Validation Attacks: When Software Accepts the Wrong Data

Buffer Overflow: How a Memory Mistake Becomes an Attack

Exploits: How a Weakness Becomes a Working Attack

QUOTE:
"Amateurs hack systems, professionals hack people."
