Lucene search
+L

SAP MaxDB <= 7.6.03.07 pre-auth Remote Command Execution Exploit

🗓️ 10 Jan 2008 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 18 Views

SAP MaxDB <= 7.6.03.07 pre-auth Remote Command Execution Exploit – Allows unauthenticated attackers to execute commands on the server

Code

                                                #######################################################################

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Luigi&nbsp;Auriemma

Application:&nbsp;&nbsp;SAP&nbsp;MaxDB
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;https://www.sdn.sap.com/irj/sdn/maxdb
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;http://www.sap.com
Versions:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;=&nbsp;7.6.03&nbsp;build&nbsp;007
Platforms:&nbsp;&nbsp;&nbsp;&nbsp;Windows,&nbsp;Linux&nbsp;and&nbsp;Solaris
Bug:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pre-auth&nbsp;remote&nbsp;commands&nbsp;execution
Exploitation:&nbsp;remote
Date:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;09&nbsp;Jan&nbsp;2008
Author:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Luigi&nbsp;Auriemma
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;e-mail:&nbsp;[email protected]
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;web:&nbsp;&nbsp;&nbsp;&nbsp;aluigi.org


#######################################################################


1)&nbsp;Introduction
2)&nbsp;Bug
3)&nbsp;The&nbsp;Code
4)&nbsp;Fix


#######################################################################

===============
1)&nbsp;Introduction
===============


SAP&nbsp;MaxDB&nbsp;is&nbsp;a&nbsp;commercial&nbsp;and&nbsp;widely&nbsp;known&nbsp;and&nbsp;used&nbsp;database.


#######################################################################

======
2)&nbsp;Bug
======


The&nbsp;MaxDB&nbsp;server&nbsp;executes&nbsp;&quot;cons.exe&nbsp;DATABASE&nbsp;COMMAND&quot;&nbsp;through&nbsp;system()
when&nbsp;some&nbsp;special&nbsp;commands&nbsp;are&nbsp;called&nbsp;by&nbsp;the&nbsp;user.
Some&nbsp;of&nbsp;these&nbsp;special&nbsp;commands&nbsp;are&nbsp;&quot;show&quot;&nbsp;and&nbsp;&quot;exec_sdbinfo&quot;&nbsp;and&nbsp;this
last&nbsp;one&nbsp;is&nbsp;just&nbsp;one&nbsp;of&nbsp;the&nbsp;small&nbsp;amount&nbsp;of&nbsp;commands&nbsp;which&nbsp;can&nbsp;be
executed&nbsp;by&nbsp;the&nbsp;unauthenticated&nbsp;users&nbsp;before&nbsp;logging&nbsp;in.

The&nbsp;usage&nbsp;of&nbsp;system()&nbsp;for&nbsp;executing&nbsp;the&nbsp;cons&nbsp;program&nbsp;allows&nbsp;an&nbsp;external
unauthenticated&nbsp;attacker&nbsp;to&nbsp;execute&nbsp;any&nbsp;command&nbsp;he&nbsp;wants&nbsp;on&nbsp;the&nbsp;target
SAP&nbsp;MaxDB&nbsp;server&nbsp;simply&nbsp;passing&nbsp;the&nbsp;&quot;&amp;&amp;&quot;&nbsp;or&nbsp;other&nbsp;patterns&nbsp;for&nbsp;the
execution&nbsp;of&nbsp;multiple&nbsp;commands&nbsp;in&nbsp;the&nbsp;shell.

So&nbsp;it's&nbsp;just&nbsp;enough&nbsp;to&nbsp;use&nbsp;the&nbsp;following&nbsp;SAP&nbsp;command&nbsp;to&nbsp;see&nbsp;the&nbsp;content
of&nbsp;C:&nbsp;on&nbsp;Windows&nbsp;(the&nbsp;bug&nbsp;is&nbsp;naturally&nbsp;exploitable&nbsp;on&nbsp;any&nbsp;other
platform&nbsp;supported&nbsp;by&nbsp;the&nbsp;server):

&nbsp;&nbsp;exec_sdbinfo&nbsp;&amp;&amp;&nbsp;echo&nbsp;dir&nbsp;c:\&nbsp;|&nbsp;cmd.exe

Then&nbsp;the&nbsp;rest&nbsp;and&nbsp;all&nbsp;the&nbsp;other&nbsp;possibilities&nbsp;of&nbsp;exploiting&nbsp;this
vulnerability&nbsp;are&nbsp;in&nbsp;the&nbsp;fantasy&nbsp;of&nbsp;the&nbsp;attacker...


#######################################################################

===========
3)&nbsp;The&nbsp;Code
===========


http://aluigi.org/poc/sapone.zip
http://www.milw0rm.com/sploits/2008-sapone.zip


#######################################################################

======
4)&nbsp;Fix
======


No&nbsp;fix


#######################################################################
                              

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

10 Jan 2008 00:00Current
7.1High risk
Vulners AI Score7.1
18