Prepare for the Ethical Hacking Essentials Test. Study with flashcards and multiple-choice questions, each exam includes hints and explanations. Get ready to ace your certification exam!

Each practice test/flash card set has 50 randomly selected questions from a bank of over 500. You'll get a new set of questions each time!

Practice this question and more.


What type of attack involves sending and executing arbitrary scripts on a system?

  1. Memory corruption

  2. Malware injection

  3. Code injection

  4. Denial of service

The correct answer is: Code injection

The correct choice is related to the attack method where an attacker sends and executes arbitrary scripts on a system. Code injection attacks exploit vulnerabilities in software that allow an attacker to introduce malicious code into a program. This malicious code is then executed by the host application, which can lead to unauthorized operations, data manipulation, and system compromise. Code injection can take several forms, such as SQL injection, where attackers insert SQL statements into input fields to manipulate the database, or cross-site scripting (XSS), where scripts are injected into web pages viewed by other users. These attacks often target web applications, utilizing forms, cookies, or other means to introduce harmful code. In contrast, memory corruption refers to attacks that directly alter the program’s memory structure, often to bypass security measures, while malware injection specifically refers to placing harmful software (malware) onto a system, and denial of service attacks focus on making a service unavailable to its intended users rather than executing code on the target system.