Simple Vulnerabilities. Big Pay Off.
The Grandstream UCM6202 PBX contains an unauthenticated SQL injection in the 'Forgot Password?' function that allows an attacker to bypass username validation and inject commands into a popen call, leading to remote command execution. Additionally, three blind SQL injection vulnerabilities in the pbxmid binary allow an unauthenticated attacker to dump the users table and gain administrative control.
medium.com
Published on medium.com
Toll fraud comes in many forms: international and domestic revenue sharing, dial-through fraud, traffic pumping, wangiri, and more. And it’s lucrative.
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 developers built SQL queries directly from user input without proper sanitisation, and then passed that input to a shell command, assuming the SQL query would validate it.
Impact
An unauthenticated attacker could gain full control of the PBX, access cleartext passwords, and commit toll fraud; the vulnerability was actively exploited in the wild.
What the attacker needed
Network access to the PBX web interface
The fix
The command injection was partially patched in version 1.0.19.20, but the blind SQL injections were reported and presumably fixed later.
How it was found
- Send a crafted username to the 'Forgot Password?' function that closes the SQL query and adds a command to execute.
- The SQL injection bypasses the username validation, so the malicious input is passed to the popen call.
- The popen call executes the injected command, giving the attacker a reverse shell.
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.
A PBX is a phone system for businesses. The researcher found that the login and password reset features did not properly check what users typed in, allowing attackers to trick the system into running commands or revealing passwords. This could let attackers make expensive international calls at the victim's expense.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.