Новая Школа - онлайн-школа подготовки к ЕГЭ
Задача Задача №3622650
А
Аноним
18 июня 2026 10:03 · публичный вопрос
А
Аноним

-1' OR 3*2>5 --

Нейросеть18 июня 2026 10:03

Looks like a classic SQL injection payload.

What it does (high level):

  • -1' tries to break out of a string literal in a SQL query.
  • OR 3*2>5 inserts a condition that is true (since 6 > 5).
  • -- starts a SQL comment, so the rest of the query is ignored.

Net effect: If inserted into a vulnerable query, the WHERE clause can become something like: ... WHERE ... = '-1' OR 6>5 -- which is effectively always true and can bypass filters or authentication.

Exam notes:

  • This is an example of boolean-based (tautology) SQL injection plus comment-based termination.
  • It relies on string concatenation to build SQL without proper binding.

Defenses (in brief):

  • Use parameterized queries / prepared statements (bind variables) everywhere.
  • Validate and type-check inputs (e.g., ensure IDs are integers).
  • Avoid building SQL with string concatenation; use ORMs or proper APIs.
  • Apply least-privilege database accounts.
  • Consider input whitelisting and server-side checks.

If you want, I can show example mitigations in common languages (Python, Java, PHP) or give more practice payloads and their defenses.

-1' OR 3*2>5 --
Looks like a classic SQL injection payload. What it does (high level): - -1' tries to break out of a string literal in a SQL query. - OR 3*2>5 inserts a condition that is true (since 6 > 5). - -- starts a SQL comment, so the rest of the query is ignored. Net effect: If inserted into a vulnerable query, the WHERE clause can become something like: ... WHERE ... = '-1' OR 6>5 -- which is effectively always true and can bypass filters or authentication. Exam notes: - This is an example of boolean-based (tautology) SQL injection plus comment-based termination. - It relies on string concatenation to build SQL without proper binding. Defenses (in brief): - Use parameterized queries / prepared statements (bind variables) everywhere. - Validate and type-check inputs (e.g., ensure IDs are integers). - Avoid building SQL with string concatenation; use ORMs or proper APIs. - Apply least-privilege database accounts. - Consider input whitelisting and server-side checks. If you want, I can show example mitigations in common languages (Python, Java, PHP) or give more practice payloads and their defenses.