Question 531 · 654 in bank
What is a difference between an XSS attack and an SQL injection attack?
Show answer
Answer: D
Explanation
D. SQL injection attacks are used to steal information from databases, whereas XSS attacks are used to redirect users to websites where attackers can steal data from them. Cross-site scripting (XSS) is a type of security vulnerability that allows attackers to inject malicious code into a website, which can be executed by unsuspecting users when they visit the website. The malicious code can be used to steal information from the user's browser, such as login credentials or personal information. XSS attacks can exist in many different types of applications, including web-based applications, mobile apps, and even PDFs. SQL injection is a type of attack that targets SQL databases. The attacker injects malicious SQL code into a web application's input fields, which can be executed by the database. This can allow the attacker to steal sensitive information from the database, such as login credentials, credit card numbers, and other sensitive data. SQL injection attacks can exist in many different types of applications that use SQL databases, including web-based applications, mobile apps, and even PDFs.
Source: Adapted from community discussion — sull3y

