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

555-1); waitfor delay '0:0:15' --

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

Here’s the high‑level idea behind that string.

  • It’s a time-based blind SQL injection payload (restricted to SQL Server, which uses WAITFOR DELAY).
  • How it works (conceptually):
    • The attacker tries to end the current SQL statement (often by closing a value and a statement, e.g., the trailing 555-1) and then uses a semicolon to start a new statement.
    • waitfor delay '0:0:15' tells SQL Server to sleep for 15 seconds.
    • The trailing -- comments out the rest of the original query so it isn’t syntactically broken by the injected text.
    • If the vulnerable application is actually injecting user input into SQL, the response time can reveal whether a condition is true or false (based on the observed delay), enabling the attacker to infer data character by character.

Defensive notes (exam-ready topics):

  • Root cause: dynamic string construction in SQL statements without proper parameterization.
  • Prevention:
    • Use parameterized queries or prepared statements; never concatenate user input into SQL.
    • Avoid building SQL with string interpolation; use binding for all user-supplied data.
    • Use least-privilege database accounts (no access beyond what the app needs).
    • Input validation and proper escaping where appropriate (though parameterization is the main defense).
    • Employ a web application firewall and logging/monitoring to detect unusual delays or repeated payloads.
    • Regular security testing in authorized environments (static/dynamic analysis, vulnerability scanning, and manual testing with permission).

If you want, I can tailor this to specific exam questions (e.g., definitions, how to defend, or short answer practice).