In which of the following exploits does an attacker insert malicious code into a link that appears to be from a trustworthy source?

  1. Cross-Site Scripting

  2. Buffer over flows

  3. Command injection

  4. Path traversal attack


Correct Option: A
Explanation:

To solve this question, the user needs to be familiar with the concept of different types of security vulnerabilities.

The answer to this question is A. Cross-Site Scripting (XSS).

Explanation:

A Cross-Site Scripting (XSS) attack occurs when an attacker injects malicious code into a web page that is viewed by other users. This attack typically takes advantage of vulnerabilities in web applications that do not properly validate user input.

In an XSS attack, the attacker may insert malicious code into a link that appears to be from a trustworthy source, such as a social networking site or an online banking application. When the victim clicks on the link, the malicious code is executed, allowing the attacker to steal sensitive information or take control of the victim's computer.

Option B, Buffer overflows, is a type of vulnerability that occurs when a program attempts to write more data to a buffer than it can hold. This can allow an attacker to overwrite critical data or execute malicious code.

Option C, Command injection, is a type of vulnerability that occurs when an attacker is able to execute arbitrary commands on a target system. This can allow the attacker to gain unauthorized access or perform other malicious actions.

Option D, Path traversal attack, is a type of vulnerability that occurs when an attacker is able to navigate to directories or files outside of the web root directory. This can allow the attacker to access sensitive files or execute malicious code.

Therefore, the correct answer is A. Cross-Site Scripting (XSS).

Find more quizzes: