ハッカーが悪意のあるコードをWebアプリケーションを介して無防備なユーザーに送信し、被害者のWebブラウザにコードの実行を要求するために使用する攻撃方法はどれですか。
正解:D
Cross-site scripting (XSS) is the method of attack that is used by a hacker to send malicious code through a web application to an unsuspecting user to request that the victim's web browser executes the code. XSS is a type of injection attack that exploits the lack of input validation or output encoding in a web application. An attacker can craft a malicious script and embed it in a web page or a URL that is sent to the user. When the user visits the web page or clicks the URL, the script is executed by the user's browser, which may not be able to distinguish it from legitimate code. The script can then perform various actions, such as stealing cookies, session tokens, or other sensitive information, redirecting the user to a malicious site, or performing actions on behalf of the user12. The other options are not correct, because they are not methods of attack that use web applications to execute malicious code on the user's browser. Buffer overflow is a type of attack that exploits a memory vulnerability in a program or system, where an attacker can overwrite the memory beyond the allocated buffer and execute arbitrary code3. Browser WGET is a command-line tool that can be used to download files from the web, but it is not an attack method by itself4. SQL injection is a type of attack that exploits a database vulnerability in a web application, where an attacker can inject malicious SQL statements into a user input field and execute them on the database server5. References:
* 1: What is Cross-Site Scripting (XSS)? - Cisco
* 2: Cross-Site Scripting (XSS) - OWASP
* 3: What is a Buffer Overflow? - Cisco
* 4: GNU Wget 1.21.1 Manual
* 5: What is SQL Injection (SQLi)? - Cisco