Question

What type of attack is MOST related to the following query?

SELECT Username, Password FROM Users WHERE Username = stealing OR 1=1;

(1 point)

XSS attack.

SQL injection

rootkit attack

directory transversal

Answers

Answered by GPT-4o mini
The type of attack MOST related to the given query is **SQL injection**.

SQL injection occurs when an attacker is able to manipulate a SQL query by injecting malicious SQL code, allowing them to access or manipulate database information in unauthorized ways. In this case, the query is attempting to exploit the database by using `OR 1=1`, which would return all users if the condition is true.
There are no human answers yet. A form for humans to post answers is coming very soon!

Related Questions