# What is sleep function in SQL injection?

The `SLEEP(5)` portion is an injected SQL command which tells the database to pause for five seconds. If a delay is observed in the server's response, it indicates that our injected `SLEEP(5)` command was executed by the database, demonstrating the presence of a time-based SQL injection vulnerability.

Bron: [Exploiting Time-Based SQL Injections: Data Exfiltration - Medium](https://medium.com/@vikramroot/exploiting-time-based-sql-injections-data-exfiltration-791aa7f0ae87#:~:text=The%20%60SLEEP(5)%60%20portion,time%2Dbased%20SQL%20injection%20vulnerability.)

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

## What is the SLEEP function in SQL?

Sleeps (pauses) for the number of seconds given by the duration argument, then returns 0 . If SLEEP() is interrupted, it returns 1 . The duration may have a fractional part given in microseconds. Statements using the SLEEP() function are not safe for statement-based replication.

Bron: [SLEEP - MariaDB Knowledge Base](https://mariadb.com/kb/en/sleep/#:~:text=Sleeps%20(pauses)%20for%20the%20number,safe%20for%20statement%2Dbased%20replication.)

## What is SLEEP function in MySQL?

SLEEP( seconds ) This function pauses the execution of an SQL statement in which it is given for the number of seconds given. It returns 0 in the results if successful; 1 if not. This function became available as of version 5.0.12 of MySQL.

Bron: [SLEEP() - MySQL in a Nutshell, 2nd Edition (Book) - O'Reilly](https://www.oreilly.com/library/view/mysql-in-a/9780596514334/re284.html#:~:text=SLEEP(%20seconds%20),version%205.0.12%20of%20MySQL.)

## What is the SQL injection function?

SQL injection, also known as SQLI, is a common attack vector that uses malicious SQL code for backend database manipulation to access information that was not intended to be displayed. This information may include any number of items, including sensitive company data, user lists or private customer details.

Bron: [What is SQL Injection | SQLI Attack Example & Prevention Methods](https://www.imperva.com/learn/application-security/sql-injection-sqli/#:~:text=SQL%20injection%2C%20also%20known%20as,lists%20or%20private%20customer%20details.)

## Verwante vragen

- [What is the sleep command injection in SQL?](https://1001vragen.nl/vraag/what-is-the-sleep-command-injection-in-sql.md)
- [Can you sleep in a tent?](https://1001vragen.nl/vraag/can-you-sleep-in-a-tent.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)
- [What is the limit clause in SQL injection?](https://1001vragen.nl/vraag/what-is-the-limit-clause-in-sql-injection.md)
- [What is the easiest SQL injection attack?](https://1001vragen.nl/vraag/what-is-the-easiest-sql-injection-attack.md)
- [How does a WAF detect SQL injection?](https://1001vragen.nl/vraag/how-does-a-waf-detect-sql-injection.md)
- [How do you escape a single quote in SQL injection?](https://1001vragen.nl/vraag/how-do-you-escape-a-single-quote-in-sql-injection.md)
- [Which SQL injection defense method should only be used as a last resort?](https://1001vragen.nl/vraag/which-sql-injection-defense-method-should-only-be-used-as-a-last-resort.md)
- [What is an important defense mechanism against SQL injection?](https://1001vragen.nl/vraag/what-is-an-important-defense-mechanism-against-sql-injection.md)
