How to Hack Your Alexa Using a Voice Command-SQL Injection
A voice assistant skill that passes spoken input into SQL queries was vulnerable to SQL injection, allowing an attacker to speak a crafted phrase and retrieve another user's account balance. The demo showed access to an admin account's balance information.
hackernoon.com
Published on hackernoon.com
Protego’s Head of Security and Ethical Hacker, Tal Melamed, demonstrates how a simple SQL injection can be executed through a verbal command in order to gain unauthorized access to sensitive account data. The tried and true SQL injection attack has is now voice-enabled, now it is easier than ever for hackers to…
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the application built SQL queries by directly concatenating spoken input without parameterisation or validation.
Impact
An attacker could retrieve sensitive account data, including an admin account's balance, from any voice-enabled application vulnerable to SQL injection.
What the attacker needed
A voice assistant skill using SQL; the skill is vulnerable to SQL injection; a query includes an integer value
The fix
The application should be fixed by using parameterised queries and input validation so that spoken input cannot alter SQL commands.
How it was found
- The attacker asks the voice assistant to access an admin account by name and account ID.
- The assistant denies the request.
- The attacker bypasses the denial by calling a random number with syntax that triggers SQL.
- When asked for an account ID, the attacker says a random number and adds a condition that is always true.
- The assistant returns the balance information of the unauthorised admin account.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
SQL injection is when user input is inserted into a database command without proper handling, letting an attacker change the command's meaning. Here, instead of typing, the attacker speaks a phrase that the voice assistant turns into text and sends to the database. Because the application did not treat the spoken words safely, the attacker could ask for data they should not see.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.