Trustwave SpiderLabs Uncovers Ov3r_Stealer Malware Spread via Phishing and Facebook Advertising. Learn More

Trustwave SpiderLabs Uncovers Ov3r_Stealer Malware Spread via Phishing and Facebook Advertising. Learn More

Services
Capture
Managed Detection & Response

Eliminate active threats with 24/7 threat detection, investigation, and response.

twi-managed-portal-color
Co-Managed SOC (SIEM)

Maximize your SIEM investment, stop alert fatigue, and enhance your team with hybrid security operations support.

twi-briefcase-color-svg
Advisory & Diagnostics

Advance your cybersecurity program and get expert guidance where you need it most.

tw-laptop-data
Penetration Testing

Test your physical locations and IT infrastructure to shore up weaknesses before exploitation.

twi-database-color-svg
Database Security

Prevent unauthorized access and exceed compliance requirements.

twi-email-color-svg
Email Security

Stop email threats others miss and secure your organization against the #1 ransomware attack vector.

tw-officer
Digital Forensics & Incident Response

Prepare for the inevitable with 24/7 global breach response in-region and available on-site.

tw-network
Firewall & Technology Management

Mitigate risk of a cyberattack with 24/7 incident and health monitoring and the latest threat intelligence.

Solutions
BY TOPIC
Microsoft Exchange Server Attacks
Stay protected against emerging threats
Rapidly Secure New Environments
Security for rapid response situations
Securing the Cloud
Safely navigate and stay protected
Securing the IoT Landscape
Test, monitor and secure network objects
Why Trustwave
About Us
Awards and Accolades
Trustwave SpiderLabs Team
Trustwave Fusion Security Operations Platform
Trustwave Security Colony
Partners
Technology Alliance Partners
Key alliances who align and support our ecosystem of security offerings
Trustwave PartnerOne Program
Join forces with Trustwave to protect against the most advance cybersecurity threats
SpiderLabs Blog

MySQL/MariaDB: Trade You a Banana for Root Access?

Summary

Over the weekend, an Authentication Bypass Vulnerability for MySQL and MariaDB (CVE-2012-2122) was released by Sergei Golubchik of Monty Program Ab (link). The vulnerability is trivial to exploit and has the potential to expose root user access to the database instance if the database service is exposed. As it happens, the binary packages provided by some popular Linux variants including Ubuntu, OpenSuSE, Fedora and others are affected by this issue.

In this post, we will cover exploiting the vulnerability as well as what you should do if you are running/evaluating vulnerable MySQL or MariaDB services.

Exploiting the MySQL Vulnerability

I spent some time this morning to confirm the vulnerability on a vanilla Ubuntu 12.04 LTS Linux 64-bit VM. I downloaded the latest Ubuntu 64-bit version, installed mysql-server using apt-get and here is what I came up with…

Successful MySQL Login (root/toor on localhost)
7913_0e7efeab-22a7-4dda-8bf4-0791ea4ffe47

Failed MySQL Login (root/bananas on localhost)
BSL_8436_28ece772-db8b-4e5e-af5c-65b22d002647

Successful MySQL Auth Bypass (root/bananas on localhost)
BSL_9092_49dfecc6-3e69-464d-8606-51834957de0f
BSL_11794_ca2e3447-4556-4a07-bded-ede5319f3316
Note:
The proof of concept above was based on info provided in Metasploit blog posted here earlier today.


What You Should Do?

Please note that at the time of this writing, the community is still in the process of identifying specific OS variants and their associated binary packages and compile options that are affected by this vulnerability. As a safety precaution, it is encouraged that all MySQL and MariaDB instances be tested for the existance of the vulnerability. Additionally, both vendors have addressed this vulnerability so it is highly recommended that the associated patches are applied as soon as possible and that access to the database service and users should be restricted by IP.

Additionally, for penetration testers and security assessors, you might want to jump on this now so you help your customers/clients confirm their exposure and/or mitigate this risk. The above example will work against remote instances by simply changing the value of the ip supplied to the "-h" (host) switch.

Latest SpiderLabs Blogs

Welcome to Adventures in Cybersecurity: The Defender Series

I’m happy to say I’m done chasing Microsoft certifications (AZ104/AZ500/SC100), and as a result, I’ve had the time to put some effort into a blog series that hopefully will entertain and inform you...

Read More

Trustwave SpiderLabs: Insights and Solutions to Defend Educational Institutions Against Cyber Threats

Security teams responsible for defending educational institutions at higher education and primary school levels often find themselves facing harsh lessons from threat actors who exploit the numerous...

Read More

Breakdown of Tycoon Phishing-as-a-Service System

Just weeks after Trustwave SpiderLabs reported on the Greatness phishing-as-a-service (PaaS) framework, SpiderLabs’ Email Security team is tracking another PaaS called Tycoon Group.

Read More