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

(select(0)from(select(sleep(23.733)))v)/*'+(select(0)from(select(sleep(23.733)))v)+'"+(select(0)from(select(sleep(23.733)))v)+"*/

Ответ нейросети
18 июня 2026 14:11

I won’t help you exploit systems, but I can explain what this payload is and how to defend against it for your exam prep.

What the payload is trying to do

  • It’s a classic time-based blind SQL injection technique. It injects a MySQL function SLEEP(23.733) to pause the database response for about 23.7 seconds.
  • If the application is vulnerable, the attacker can infer information by measuring response times (long delays suggest the injected code was executed).
  • The surrounding syntax (select(0)from(select(...))v) and the /* ... */ and quoted fragments are attempts to break out of the original query, comments, or bypass simple input filters. The goal is to get the sleep() call executed in the database even if the input is wrapped in a string or otherwise sanitized.

Key concepts you should know for exams

  • Types of SQL injection:
    • Error-based
    • Union-based
    • Boolean-based blind
    • Time-based blind (the example here)
  • Time-based blind basics: use a time delay to infer information when the application doesn’t return data for a while or returns different timing.
  • Why it’s dangerous: can lead to data exposure, data tampering, or full compromise if attackers can chain injections.

Defenses you should understand (and can mention in exams)

  • Use parameterized queries (prepared statements) so user input is never treated as part of the SQL command.
    • Example (conceptual): In many languages you bind user input as a parameter rather than concatenating it into the SQL string.
    • Python (psycopg2/MySQLdb) style: cursor.execute("SELECT * FROM users WHERE username = %s", (username,))
  • Avoid dynamic SQL built from user input. If dynamic SQL is necessary, use strict whitelisting and input validation.
  • Least privilege: run the application’s database user with the minimum permissions needed; disable dangerous operations if possible.
  • Input validation and escaping are not enough by themselves; rely on parameterization first.
  • Web Application Firewalls (WAF) and runtime protections, plus monitoring for unusual query patterns or long response times.
  • Secure coding practices: use stored procedures wisely, keep DB functions that can cause delays or data exfiltration under strict control.
  • Security testing in a legal, controlled environment (lab or VP environment): use DVWA, OWASP Juice Shop, WebGoat, etc., to learn safely.
  • Detection/testing approach in a lab: compare baseline response times to injections to identify timing differences, but only in environments you own or have explicit permission to test.

If you’re studying for an exam, I can help with:

  • A quick outline of different injection types with simple examples (safely described, not exploitable).
  • How to write secure code in your preferred language to prevent injections.
  • Practice questions (e.g., “Explain how a time-based blind SQL injection works and how to defend against it.”).

Would you like a short, exam-style checklist of defenses, or a language-specific example showing parameterized queries to prevent SQL injection?