- Arbitrary code execution
computer security, arbitrary code execution is used to describe an attacker's ability to execute any commands of the attacker's choice on a target machine or in a target process. It's commonly used in arbitrary code execution vulnerability to describe a software bugthat gives an attacker a way to execute arbitrary code. A program that is designed to exploit such a vulnerability is called an arbitrary code execution exploit. Most of these vulnerabilities allow the execution of machine codeand most exploits therefore inject and execute shellcodeto give an attacker an easy way to manually run arbitrary commands. The ability to trigger arbitrary code execution from one machine on another is often referred to as remote code execution.
It is the worst effect a bug can have because it allows an attacker to completely take over the vulnerable process. From there the attacker can potentially take complete control over the machine the process is running on. Arbitrary code execution vulnerabilities are commonly exploited by
malwareto run on a computer without the owners consent.
Arbitrary code execution is commonly achieved through control over the
program counter(also known as the instruction pointer) of a running process. The instruction pointer points to the next instruction in the process that will be executed. Control over the value of the instruction pointer therefore gives control over which instruction is executed next. In order to execute arbitrary code, many exploits inject code into the process and use a vulnerability to change the instruction pointer to have it point to the injected code. The injected code will then automatically get executed.
Wikimedia Foundation. 2010.