# What is the sleep command injection in SQL?

Time-based SQL injection is a type of blind SQL injection attack, where an attacker sends specific SQL queries that force the database to 'sleep' or pause for a specified period, thus confirming the vulnerability.

Bron: [Exploiting Time-Based SQL Injections: Data Exfiltration - Medium](https://medium.com/@vikramroot/exploiting-time-based-sql-injections-data-exfiltration-791aa7f0ae87#:~:text=Time%2Dbased%20SQL%20injection%20is,period%2C%20thus%20confirming%20the%20vulnerability.)

Onderwerp: [Techniek & internet](https://1001vragen.nl/onderwerp/techniek-en-internet)
Toegevoegd: 2024-04-17
Webpagina: https://1001vragen.nl/vraag/what-is-the-sleep-command-injection-in-sql

## What is SQL SLEEP command?

MySQL has many useful but yet unexplored features. SLEEP() is one of these. SLEEP is a query that pauses the MySQL process for a given duration.

Bron: [How and When To Use SLEEP() Correctly in MySQL? - GeeksforGeeks](https://www.geeksforgeeks.org/how-and-when-to-use-sleep-correctly-in-mysql/#:~:text=MySQL%20has%20many%20useful%20but,process%20for%20a%20given%20duration.)

## What is SQL injection commands?

SQL injection usually occurs when you ask a user for input, like their username/userid, and instead of a name/id, the user gives you an SQL statement that you will unknowingly run on your database. Look at the following example which creates a SELECT statement by adding a variable (txtUserId) to a select string.

Bron: [SQL Injection - W3Schools](https://www.w3schools.com/sql/sql_injection.asp#:~:text=SQL%20injection%20usually%20occurs%20when,txtUserId)%20to%20a%20select%20string.)

## What is time-based SQL injection attack?

Time-based SQL Injection is an inferential SQL Injection technique that relies on sending an SQL query to the database which forces the database to wait for a specified amount of time (in seconds) before responding.

Bron: [Types of SQL Injection (SQLi) - Acunetix](https://www.acunetix.com/websitesecurity/sql-injection2/#:~:text=Time%2Dbased%20SQL%20Injection%20is,(in%20seconds)%20before%20responding.)

## Verwante vragen

- [What is sleep function in SQL injection?](https://1001vragen.nl/vraag/what-is-sleep-function-in-sql-injection.md)
- [Can you sleep in a tent?](https://1001vragen.nl/vraag/can-you-sleep-in-a-tent.md)
- [What is the home command in Unix?](https://1001vragen.nl/vraag/what-is-the-home-command-in-unix.md)
- [Which SQL command is used to add a row to the customers table with customer_id, name, and address columns?](https://1001vragen.nl/vraag/which-sql-command-is-used-to-add-a-row-to-the-customers-table-with-customer-id-name-and-address-columns.md)
- [Which SQL command is used to retrieve all the columns from a table named employees?](https://1001vragen.nl/vraag/which-sql-command-is-used-to-retrieve-all-the-columns-from-a-table-named-employees.md)
- [How to fix ora 00933 SQL command not properly ended?](https://1001vragen.nl/vraag/how-to-fix-ora-00933-sql-command-not-properly-ended.md)
- [What is the easiest SQL injection attack?](https://1001vragen.nl/vraag/what-is-the-easiest-sql-injection-attack.md)
- [What is the limit clause in SQL injection?](https://1001vragen.nl/vraag/what-is-the-limit-clause-in-sql-injection.md)
- [What is the main difference between a normal SQL injection and a blind SQL injection vulnerability?](https://1001vragen.nl/vraag/what-is-the-main-difference-between-a-normal-sql-injection-and-a-blind-sql-injection-vulnerability.md)
- [What are 5 types of SQL injection?](https://1001vragen.nl/vraag/what-are-5-types-of-sql-injection.md)
