Sports 0 0 0 Waitfor Delay 0 0 20 --

Published
Length
3 min read

Luis Felipe Dias

All posts

The string sports 0 0 0 waitfor delay 0 0 20 is a time-based SQL injection test. You stop this attack by using safe query inputs and strict database role permissions. Security scanners and attackers send this text into web forms and URL fields. They watch if the server pauses for twenty seconds before sending a reply. Many teams set up their apps with one broad database role for all queries. When a role has broad rights, a single bad input can read or change everything. How the sports 0 0 0 wa

Waitfor Delay: the complete guide

Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.

Free white paper. No spam. Unsubscribe anytime.

The string sports 0 0 0 waitfor delay 0 0 20 is a time-based SQL injection test. You stop this attack by using safe query inputs and strict database role permissions. Security scanners and attackers send this text into web forms and URL fields. They watch if the server pauses for twenty seconds before sending a reply. Many teams set up their apps with one broad database role for all queries. When a role has broad rights, a single bad input can read or change everything.

How the sports 0 0 0 waitfor delay 0 0 20 attack works

Automated bots look for web pages that load items by category or ID. A bot might see a page that lists sports gear and takes numbers as filters. It swaps those normal inputs with a sleep command for Microsoft SQL Server. The waitfor delay command tells the database engine to pause for a set time. Here, the zeroes and twenty mean zero hours, zero minutes, and twenty seconds.

This method is called blind SQL injection because the page shows no database errors. The attacker does not need to see raw table rows on the screen. Instead, the attacker measures how long the web server takes to respond. If the page takes twenty extra seconds to load, the test worked. The bot now knows the app puts raw user text straight into a query. Next, the attacker asks true or false questions using that same time pause. If a guess about a password letter is true, the server waits twenty seconds. Step by step, the attacker maps out private tables, emails, phone numbers, and card numbers.

How to fix query inputs and database roles

Your first step is to change how your app builds database queries. Developers must stop joining raw user strings with SQL commands in app code. Instead, teams use prepared statements and safe parameters for every single user input. When you use parameters, the database treats the input as plain text only. The engine never runs the waitfor delay text as an active command. Input checks in the app should also reject letters when a field needs numbers.

Your second step is to narrow the permissions of the app database role. Many teams let the web app log in as a database owner. That setup gives every web form full power over the whole server. You should create a dedicated role that only reads the specific tables it needs. Drop access to system tables and block commands that run host tasks. Also set a short query timeout on the database server itself. A five-second timeout cuts off long sleep probes before they finish.

Waitfor Delay: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Why native roles leave an operational gap

Safe code and strict database roles are vital parts of your defense. Still, native database roles only check who logs in at the start. Once a user or app logs in, the database trusts that session. It does not check the risk of each statement in flight. An engineer with a valid login might still run a broad query during a fix.

App fixes also take time to test and ship across old systems. While teams update old code, live databases still face raw queries from users and staff. Native roles cannot rewrite sensitive fields like national IDs or emails in query results. They also fail to tie individual SQL statements back to a single person. Teams need clear logs and active controls on every query that runs.

Check database and API queries on the wire

Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.

Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.

Frequently asked questions

Why did sports 0 0 0 waitfor delay 0 0 20 show up in my logs?

An automated scanner or attacker tested your site for blind SQL injection flaws. The bot appended a twenty-second sleep command to a normal page request.

Which database engines run the waitfor delay command?

Microsoft SQL Server and Sybase databases use this specific command to pause queries. Even if you use another database, bots still send this test to all sites.

How can I tell if the time-based probe worked?

Check your web server logs for the exact response time of that request. If the request took twenty seconds longer than normal, your app ran the command.

Save the open-source gateway.

hoop is MIT-licensed infrastructure for controlling how AI agents reach production data. Star hoophq/hoop so you can inspect it, deploy it, or share it when your team starts governing agent access.