LevelBlue Completes Acquisition of Trustwave to Form the World's Largest Pure-Play MSSP.  Learn More

LevelBlue Completes Acquisition of Trustwave to Form the World's Largest Pure-Play MSSP.  Learn More

Services
Managed Detection & Response

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

Co-Managed SOC (SIEM)

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

Advisory & Diagnostics

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

Penetration Testing

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

Database Security

Prevent unauthorized access and exceed compliance requirements.

Email Security

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

Digital Forensics & Incident Response

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

Firewall & Technology Management

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

Solutions
BY TOPIC
Offensive Security
Solutions to maximize your security ROI
Operational Technology
End-to-end OT security
Microsoft Security
Unlock the full power of Microsoft Security
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
Microsoft Security
Unlock the full power of Microsoft Security
Trustwave PartnerOne Program
Join forces with Trustwave to protect against the most advance cybersecurity threats

Using SQLmap to Dig for Sensitive Data in SQL Databases

In our latest report Data Pirates' Toolkit (Leveraging SQLmap for Unearthing Digital Gold), we take a comprehensive look at a tried-and-tested cyberattack methodology that threat actors can use to unlock sensitive and critical data from unsecured databases: SQL injection (SQLi) attacks.

Aside from giving an overview of SQLi attacks, the Damn Vulnerable Web Application’s (DVWA), and the DVWA’s Dockerized environment, our new report tackles the fundamental mechanisms of SQL injection vulnerabilities within the DVWA low, medium, difficult, and impossible levels, leveraging SQLmap to demonstrate core exploitation techniques.

From dissecting PHP source code to crafting effective SQLmap commands, we gained practical insight into how insecure coding practices and weak web interface design can lead to complete database compromise.

Some highlights of the report include:

  • SQLMap can be executed with the `--banner`, `--batch`, `--dbs`, `--tables`, `--columns`, `--verbose`, and `--dump` flags to present a wide variety of output in DVWA’s low level.
  • Attackers can still circumvent the security of DVWA’s medium-level interface via numeric-based SQL injections.
  • The medium-level interface has dropdown restrictions, a security enhancement that, unfortunately, can still be bypassed by intercepting the HTTP request after form submission via special tools. This can allow malicious actors to replace legitimate dropdown menu values with malicious SQL code.

Dedicated to hunting and eradicating the world’s most challenging threats.

SpiderLabs
  • In the high-level interface, DVWA introduces the retrieval of the user ID from server-side session variables and using a `LIMIT 1` clause to minimize data exposure. It also incorporates better error handling to obscure database details. However, the continued use of direct string interpolation in SQL queries leaves a residual risk, particularly if an attacker compromises the session.
  • DVWA’s impossible-level interface appears deceptively simple; however, it uses critical protections such as secure query handling and token-based session validation that effectively block SQL injection attacks. We show how the impossible level fares against the use of advanced and more aggressive SQLMap flags.

Read the full Trustwave SpiderLabs report here.

SQL injection, a code injection technique that exploits vulnerabilities in an application’s interactions with its underlying database, is not a new type of attack, but it’s still a cybercriminal favorite.

Last year, security researchers discovered a vulnerability in an air transport security system that enabled attackers to evade airport security screenings and even obtain access to aircraft cockpits. Threat actors can insert malicious SQL statements for malicious database queries in FlyCASS, a service that allows airlines to manage the Known Crewmember (KCM) program and the Cockpit Access Security System (CASS).

This vulnerability can allow threat actors to login to the system, create a fake employee account that has access to the KCM and CASS systems, evade security screening, and ultimately, access the cockpits of commercial airliners.

Gain a better understanding of the importance of mastering SQLMap to defend against ever-evolving attacks in our full report.

About the Author

Karl Biron is Security Researcher, SpiderLabs Database Security at Trustwave with nine years of technical experience. He holds multiple certifications and brings global expertise from his work across Singapore, the UAE, and the Philippines. Karl has also contributed to the field with two IEEE peer-reviewed publications, both as the lead author. Follow Karl on LinkedIn.

ABOUT TRUSTWAVE

Trustwave, A LevelBlue Company, is a globally recognized cybersecurity leader that reduces cyber risk and fortifies organizations against disruptive and damaging cyber threats. Our comprehensive offensive and defensive cybersecurity portfolio detects what others cannot, responds with greater speed and effectiveness, optimizes client investment, and improves security resilience. Learn more about us.

Latest Intelligence

Discover how our specialists can tailor a security program to fit the needs of
your organization.

Request a Demo